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

fix: armhf on arm v6 (#1027)

* fix: armhf on arm v6

* fix: armel is arm5, so fix test
This commit is contained in:
Carlos Alexandro Becker 2019-05-29 09:09:52 -03:00 committed by GitHub
parent 86c5b93260
commit 7e809382df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 10 deletions

View File

@ -13,8 +13,10 @@ func Arch(key string) string {
return "i386"
case "amd64":
return "amd64"
case "arm6": // GOARCH + GOARM
case "arm5": // GOARCH + GOARM
return "armel"
case "arm6": // GOARCH + GOARM
return "armhf"
case "arm7": // GOARCH + GOARM
return "armhf"
}

View File

@ -9,14 +9,15 @@ import (
func TestArch(t *testing.T) {
for from, to := range map[string]string{
"linuxamd64": "amd64",
"linux386": "i386",
"linuxarm64": "arm64",
"linuxarm6": "armel",
"linuxarm7": "armhf",
"linuxppc64": "ppc64",
"linuxppc64le": "ppc64le",
"linuxwhat": "what",
"linuxamd64": "amd64",
"linux386": "i386",
"linuxarm64": "arm64",
"linuxarm5": "armel",
"linuxarm6": "armhf",
"linuxarm7": "armhf",
"linuxppc64": "ppc64",
"linuxppc64le": "ppc64le",
"linuxwhat": "what",
} {
t.Run(fmt.Sprintf("%s to %s", from, to), func(t *testing.T) {
assert.Equal(t, to, Arch(from))

View File

@ -80,7 +80,7 @@ func TestRunPipe(t *testing.T) {
addBinaries(t, ctx, "foo", filepath.Join(dist, "foo"), "foo")
addBinaries(t, ctx, "bar", filepath.Join(dist, "bar"), "bar")
assert.NoError(t, Pipe{}.Run(ctx))
assert.Len(t, ctx.Artifacts.Filter(artifact.ByType(artifact.PublishableSnapcraft)).List(), 6)
assert.Len(t, ctx.Artifacts.Filter(artifact.ByType(artifact.PublishableSnapcraft)).List(), 9)
}
func TestRunPipeInvalidNameTemplate(t *testing.T) {