Skip to content

Commit

Permalink
Bump go versions
Browse files Browse the repository at this point in the history
go1.21 is EOL
go1.22 should be able to be used everywhere except compose which
requires go1.23.

Signed-off-by: Brian Goff <[email protected]>
  • Loading branch information
cpuguy83 committed Nov 5, 2024
1 parent c8bb597 commit a89212c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/moby-buildx/go_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import (
)

func GoVersion(_ *archive.Spec) string {
return goversion.OneTwentyOne
return goversion.OneTwentyTwo
}
2 changes: 1 addition & 1 deletion packages/moby-compose/go_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func GoVersion(s *archive.Spec) string {
}

if v.Compare(t) >= 0 { // if v >= t
return goversion.OneTwentyOne
return goversion.OneTwentyThree
}

return goversion.DefaultVersion
Expand Down
15 changes: 1 addition & 14 deletions packages/moby-containerd/go_version.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
package containerd

import (
"strings"

"github.com/Azure/moby-packaging/pkg/archive"
"github.com/Azure/moby-packaging/pkg/goversion"
"github.com/Masterminds/semver/v3"
)

func GoVersion(spec *archive.Spec) string {
version, _, _ := strings.Cut(spec.Tag, "~")
v, err := semver.NewVersion(version)
if err != nil {
panic(err)
}

if v.Major() < 2 {
return goversion.OneTwentyOne
} else {
return goversion.OneTwentyTwo
}
return goversion.OneTwentyTwo
}
6 changes: 3 additions & 3 deletions pkg/goversion/version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package goversion

const (
DefaultVersion = OneTwentyOne
OneTwentyOne = "1.21.12"
OneTwentyTwo = "1.22.5"
DefaultVersion = OneTwentyTwo
OneTwentyTwo = "1.22.8"
OneTwentyThree = "1.23.2"
)

0 comments on commit a89212c

Please sign in to comment.