Skip to content

Commit 6308735

Browse files
committed
cmd/release: start using the FreeBSD 11.4 builder for Go 1.17
This change uses the latest patch release of the oldest major release of FreeBSD for packaging Go 1.17 and beyond. Updates golang/go#40561 Fixes golang/go#45727 Change-Id: I1adc77560affa0db0e001388884431248e3a20ec Reviewed-on: https://go-review.googlesource.com/c/build/+/315889 Trust: Carlos Amedee <carlos@golang.org> Run-TryBot: Carlos Amedee <carlos@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
1 parent 249a248 commit 6308735

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

cmd/release/release.go

+19-9
Original file line numberDiff line numberDiff line change
@@ -177,17 +177,17 @@ var builds = []*Build{
177177
Builder: "linux-arm64-aws",
178178
},
179179
{
180-
GoQuery: ">= go1.15rc2", // See #40563.
180+
GoQuery: ">= go1.17beta1", // See #45727.
181181
OS: "freebsd",
182182
Arch: "386",
183-
Builder: "freebsd-386-11_2",
183+
Builder: "freebsd-386-11_4",
184184
},
185185
{
186-
GoQuery: ">= go1.15rc2", // See #40563.
186+
GoQuery: ">= go1.17beta1", // See #45727.
187187
OS: "freebsd",
188188
Arch: "amd64",
189189
Race: true,
190-
Builder: "freebsd-amd64-11_2",
190+
Builder: "freebsd-amd64-11_4",
191191
},
192192
{
193193
OS: "windows",
@@ -260,6 +260,19 @@ var builds = []*Build{
260260
Arch: "arm64",
261261
Builder: "linux-arm64-packet",
262262
},
263+
{
264+
GoQuery: "< go1.17beta1", // See #40563.
265+
OS: "freebsd",
266+
Arch: "386",
267+
Builder: "freebsd-386-11_2",
268+
},
269+
{
270+
GoQuery: "< go1.17beta1", // See #40563.
271+
OS: "freebsd",
272+
Arch: "amd64",
273+
Race: true,
274+
Builder: "freebsd-amd64-11_2",
275+
},
263276

264277
// Test-only builds.
265278
{
@@ -1022,17 +1035,14 @@ func match(query, goVer string) bool {
10221035
switch query {
10231036
case "": // A special case to make the zero Build.GoQuery value useful.
10241037
return true
1038+
case ">= go1.17beta1":
1039+
return !strings.HasPrefix(goVer, "go1.16") && !strings.HasPrefix(goVer, "go1.15")
10251040
case "< go1.17beta1":
10261041
return strings.HasPrefix(goVer, "go1.16") || strings.HasPrefix(goVer, "go1.15")
10271042
case ">= go1.16beta1":
10281043
return !strings.HasPrefix(goVer, "go1.15")
10291044
case "< go1.16beta1":
10301045
return strings.HasPrefix(goVer, "go1.15")
1031-
case ">= go1.15rc2":
1032-
// By the time this code is added, Go 1.15 RC 1 has already been released and
1033-
// won't be modified, that's why we only care about matching RC 2 and onwards.
1034-
// (We could've just done ">= go1.15", but that could be misleading in future.)
1035-
return goVer != "go1.15rc1" && !strings.HasPrefix(goVer, "go1.15beta")
10361046
default:
10371047
panic(fmt.Errorf("match: query %q is not supported", query))
10381048
}

cmd/release/release_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ func TestBuilderSelectionPerGoVersion(t *testing.T) {
104104
// Go 1.16 continues to use the the FreeBSD 11.2 builder.
105105
{"go1.16", "freebsd-amd64", "freebsd-amd64-11_2"},
106106
{"go1.16", "freebsd-386", "freebsd-386-11_2"},
107+
108+
// Go 1.17 starts to use the FreeBSD 11.4 builder.
109+
{"go1.17", "freebsd-amd64", "freebsd-amd64-11_4"},
110+
{"go1.17", "freebsd-386", "freebsd-386-11_4"},
107111
}
108112
for _, tc := range testCases {
109113
t.Run(tc.target+"@"+tc.goVer, func(t *testing.T) {

0 commit comments

Comments
 (0)