Skip to content
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.OneTwentyThree
return goversion.OneTwentyFour

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh, never seen something like this before

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We needed some projects to stay on an older go for some time but some required new go (really... compose always bumps to new go immediately, its frustrating).
Right now everything is good on go1.24.
At some point I'm sure something (cough compose cough) will force a bump to go1.25 and we'll need to have a split again.

}
25 changes: 1 addition & 24 deletions packages/moby-compose/go_version.go
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@
package compose

import (
"strings"

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

const (
threshold = "2.22.0"
)

func GoVersion(s *archive.Spec) string {
tag, _, _ := strings.Cut(s.Tag, "~")

v, err := semver.NewVersion(tag)
if err != nil {
return goversion.DefaultVersion
}

t, err := semver.NewVersion(threshold)
if err != nil {
return goversion.DefaultVersion
}

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

return goversion.DefaultVersion
return goversion.OneTwentyFour
}
2 changes: 1 addition & 1 deletion packages/moby-containerd/go_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import (
)

func GoVersion(spec *archive.Spec) string {
return goversion.OneTwentyThree
return goversion.OneTwentyFour
}
4 changes: 2 additions & 2 deletions pkg/goversion/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package goversion

const (
DefaultVersion = OneTwentyThree
OneTwentyThree = "1.23.12"
DefaultVersion = OneTwentyFour
OneTwentyFour = "1.24.7"
)
Loading