1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-18 03:56:52 +02:00

fix(snap): incorrect skip due go GOAMD64

the valid arch check was not considering GOAMD64

refs #3016

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos A Becker 2022-04-13 23:12:58 -03:00
parent bdef306b79
commit c30339070e
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 8 additions and 2 deletions

View File

@ -187,7 +187,10 @@ func doRun(ctx *context.Context, snap config.Snapcraft) error {
func isValidArch(arch string) bool {
// https://snapcraft.io/docs/architectures
for _, a := range []string{"s390x", "ppc64el", "arm64", "armhf", "amd64", "i386"} {
if strings.HasPrefix(arch, "amd64") {
return true
}
for _, a := range []string{"s390x", "ppc64el", "arm64", "armhf", "i386"} {
if arch == a {
return true
}

View File

@ -659,7 +659,10 @@ func Test_isValidArch(t *testing.T) {
{"ppc64el", true},
{"arm64", true},
{"armhf", true},
{"amd64", true},
{"amd64v1", true},
{"amd64v2", true},
{"amd64v3", true},
{"amd64v4", true},
{"i386", true},
{"mips", false},
{"armel", false},