mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
42fe5761f7
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.
22 lines
494 B
Go
22 lines
494 B
Go
// Package linux contains functions that are useful to generate linux packages.
|
|
package linux
|
|
|
|
import "strings"
|
|
|
|
// Arch converts a goarch to a linux-compatible arch
|
|
func Arch(key string) string {
|
|
switch {
|
|
case strings.Contains(key, "amd64"):
|
|
return "amd64"
|
|
case strings.Contains(key, "386"):
|
|
return "i386"
|
|
case strings.Contains(key, "arm64"):
|
|
return "arm64"
|
|
case strings.Contains(key, "arm6"):
|
|
return "armel"
|
|
case strings.Contains(key, "arm7"):
|
|
return "armhf"
|
|
}
|
|
return key
|
|
}
|