Skip to content

Commit

Permalink
fix: Use right architecture for ARM packages
Browse files Browse the repository at this point in the history
Previously when creating deb package for ARMv6 and ARMv7 the
architecture information were invalid in the generated package.
For example ARMv6 package got armhf architecture which is not right.
According to https://wiki.debian.org/ArmHardFloatPort,
armel is armv4t, armv5, armv6 and armhf is armv7 so updated
to use correct architecture.
  • Loading branch information
ernoaapa authored and caarlos0 committed Apr 16, 2018
1 parent 5af1abf commit 42fe576
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions internal/linux/arch.go
Expand Up @@ -13,6 +13,8 @@ func Arch(key string) string {
case strings.Contains(key, "arm64"):
return "arm64"
case strings.Contains(key, "arm6"):
return "armel"
case strings.Contains(key, "arm7"):
return "armhf"
}
return key
Expand Down
3 changes: 2 additions & 1 deletion internal/linux/arch_test.go
Expand Up @@ -12,7 +12,8 @@ func TestArch(t *testing.T) {
"amd64": "amd64",
"386": "i386",
"arm64": "arm64",
"arm6": "armhf",
"arm6": "armel",
"arm7": "armhf",
"what": "what",
} {
t.Run(fmt.Sprintf("%s to %s", from, to), func(t *testing.T) {
Expand Down

0 comments on commit 42fe576

Please sign in to comment.