Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump go versions #217

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
)
Loading