Skip to content

Commit

Permalink
Merge pull request #111 from theohbrothers/enhancement/add-docker-to-…
Browse files Browse the repository at this point in the history
…versions.json

Enhancement: Add `docker` to `versions.json`
  • Loading branch information
leojonathanoh authored Oct 21, 2023
2 parents cf5cb18 + bfe9749 commit 4dbd98c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions generate/definitions/VARIANTS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,8 @@ $VARIANTS_SHARED = @{
}
}

# Global versions
$global:VERSIONS = $local:VERSIONS

# Global cache for remote file content
$global:CACHE = @{}
7 changes: 7 additions & 0 deletions generate/definitions/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
"versionsChangeScope": "minor",
"versionsNewScript": "Invoke-WebRequest https://api.github.com/repos/coder/code-server/git/refs/tags | ConvertFrom-Json | % { $_.ref -replace 'refs/tags/v', ''} | ? { $_ -match '^\\d+\\.\\d+\\.\\d+$' } | Sort-Object { [version]$_ } -Descending | ? { [version]$_ -ge [version]'4.6' }"
},
"docker": {
"versions": [
"20.10.23"
],
"versionsChangeScope": "minor",
"versionsNewScript": "Invoke-WebRequest https://api.github.com/repos/moby/moby/git/refs/tags | ConvertFrom-Json | % { $_.ref -replace 'refs/tags/v', '' } | ? { $_ -match '^\\d+\\.\\d+\\.\\d+$' } | Sort-Object { [version]$_ } -Descending | ? { $v = [version]$_; $v.Major -eq '20' -and $v.Minor -eq '10' }"
},
"go": {
"versions": [
"1.20.10"
Expand Down
2 changes: 1 addition & 1 deletion generate/templates/Dockerfile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ RUN code-server --install-extension redhat.vscode-yaml@1.9.1
"@
foreach ($c in $VARIANT['_metadata']['components']) {
if ($c -eq 'docker' -or $c -eq 'docker-rootless') {
$DOCKER_VERSION = '20.10.23'
$DOCKER_VERSION = $global:VERSIONS.docker.versions[0]
@"
# Install docker
# See: https://github.com/moby/moby/blob/v20.10.22/project/PACKAGERS.md
Expand Down

0 comments on commit 4dbd98c

Please sign in to comment.