1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00
Carlos Alexandro Becker d85fff06a2
fix gomips support (#1331)
* wip: fix gomips

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* wip: fix gomips

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* test: added more

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* test: added more

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-02-05 22:08:18 -03:00

26 lines
559 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
//
// list of all linux arches: `go tool dist list | grep linux`
func Arch(key string) string {
var arch = strings.TrimPrefix(key, "linux")
switch arch {
case "386":
return "i386"
case "amd64":
return "amd64"
case "arm5": // GOARCH + GOARM
return "armel"
case "arm6": // GOARCH + GOARM
return "armhf"
case "arm7": // GOARCH + GOARM
return "armhf"
default:
return arch
}
}