1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

fix: ignore non-arm64/386 builds when building Scoop manifest (#2172)

This commit is contained in:
Tom Payne 2021-04-18 20:40:23 +02:00 committed by GitHub
parent 77101bea42
commit e4e242f573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 2 deletions

View File

@ -193,9 +193,18 @@ func dataFor(ctx *context.Context, cl client.Client, artifacts []*artifact.Artif
}
for _, artifact := range artifacts {
var arch = "64bit"
if artifact.Goarch == "386" {
if artifact.Goos != "windows" {
continue
}
var arch string
switch {
case artifact.Goarch == "386":
arch = "32bit"
case artifact.Goarch == "amd64":
arch = "64bit"
default:
continue
}
url, err := tmpl.New(ctx).

View File

@ -941,6 +941,23 @@ func Test_buildManifest(t *testing.T) {
},
},
},
{
Name: "foo_1.0.1_windows_arm.tar.gz",
Goos: "windows",
Goarch: "arm",
Path: file,
Extra: map[string]interface{}{
"ArtifactUploadHash": "820ead5d9d2266c728dce6d4d55b6460",
"Builds": []*artifact.Artifact{
{
Name: "foo.exe",
},
{
Name: "bar.exe",
},
},
},
},
{
Name: "foo_1.0.1_windows_386.tar.gz",
Goos: "windows",