cmd/releasebot: simplify darwin-arm64 build definition

We don't make Go 1.15 minor releases by now, so including the
darwin-arm64 build "for Go 1.16 Beta 1 and newer" is the same
as always including it.

Also update test coverage that the list of builds for Go 1.18
is the same as Go 1.17, as expected.

Change-Id: If89a25e8179de48a2c2fabe78248897a67785416
Reviewed-on: https://go-review.googlesource.com/c/build/+/368414
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
Dmitri Shuralyov 2021-12-01 15:07:49 -05:00
Родитель 233166b22f
Коммит e1b6315557
2 изменённых файлов: 3 добавлений и 24 удалений

Просмотреть файл

@ -60,7 +60,7 @@ var releaseTargets = []Target{
{Name: "windows-amd64"},
{Name: "windows-arm64", GoQuery: ">= go1.17beta1"},
{Name: "darwin-amd64"},
{Name: "darwin-arm64", GoQuery: ">= go1.16beta1"},
{Name: "darwin-arm64"},
{Name: "linux-s390x"},
{Name: "linux-ppc64le"},
@ -1055,9 +1055,7 @@ func match(query, goVer string) bool {
case "": // A special case to make the zero Target.GoQuery value useful.
return true
case ">= go1.17beta1":
return !strings.HasPrefix(goVer, "go1.16") && !strings.HasPrefix(goVer, "go1.15")
case ">= go1.16beta1":
return !strings.HasPrefix(goVer, "go1.15")
return !strings.HasPrefix(goVer, "go1.16")
default:
panic(fmt.Errorf("match: query %q is not supported", query))
}

Просмотреть файл

@ -24,6 +24,7 @@ func TestTargetSelectionPerGoVersion(t *testing.T) {
}{
{
goVer: []string{
"go1.18beta1", "go1.18rc1", "go1.18", "go1.18.1",
"go1.17beta1", "go1.17rc1", "go1.17", "go1.17.1",
},
want: []string{
@ -69,26 +70,6 @@ func TestTargetSelectionPerGoVersion(t *testing.T) {
"windows-amd64-longtest",
},
},
{
goVer: []string{"go1.15.11"},
want: []string{
"src",
"linux-386",
"linux-armv6l",
"linux-amd64",
"linux-arm64",
"freebsd-386",
"freebsd-amd64",
"windows-386",
"windows-amd64",
"darwin-amd64",
"linux-s390x",
"linux-ppc64le",
"linux-386-longtest",
"linux-amd64-longtest",
"windows-amd64-longtest",
},
},
} {
for _, goVer := range tc.goVer {
t.Run(goVer, func(t *testing.T) {