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:
parent
86c5b93260
commit
7e809382df
@ -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"
|
||||
}
|
||||
|
@ -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))
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user