mirror of
https://github.com/goreleaser/goreleaser.git
synced 2024-12-29 01:44:39 +02:00
feat: add arm64 to the default goarch list (#1999)
* feat: add arm64 to the default goarch list Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * fix: tests Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
parent
873f35a2c2
commit
2edebf0029
@ -49,7 +49,7 @@ func (*Builder) WithDefaults(build config.Build) (config.Build, error) {
|
||||
build.Goos = []string{"linux", "darwin"}
|
||||
}
|
||||
if len(build.Goarch) == 0 {
|
||||
build.Goarch = []string{"amd64", "386"}
|
||||
build.Goarch = []string{"amd64", "arm64", "386"}
|
||||
}
|
||||
if len(build.Goarm) == 0 {
|
||||
build.Goarm = []string{"6"}
|
||||
|
@ -66,6 +66,7 @@ func TestWithDefaults(t *testing.T) {
|
||||
targets: []string{
|
||||
"linux_amd64",
|
||||
"linux_386",
|
||||
"linux_arm64",
|
||||
"darwin_amd64",
|
||||
},
|
||||
goBinary: "go",
|
||||
|
@ -264,7 +264,7 @@ func TestDefaultEmptyBuild(t *testing.T) {
|
||||
require.Equal(t, ".", build.Dir)
|
||||
require.Equal(t, ".", build.Main)
|
||||
require.Equal(t, []string{"linux", "darwin"}, build.Goos)
|
||||
require.Equal(t, []string{"amd64", "386"}, build.Goarch)
|
||||
require.Equal(t, []string{"amd64", "arm64", "386"}, build.Goarch)
|
||||
require.Equal(t, []string{"6"}, build.Goarm)
|
||||
require.Len(t, build.Ldflags, 1)
|
||||
require.Equal(t, "-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser", build.Ldflags[0])
|
||||
@ -334,7 +334,7 @@ func TestDefaultPartialBuilds(t *testing.T) {
|
||||
require.Equal(t, ".", build.Dir)
|
||||
require.Equal(t, "./cmd/main.go", build.Main)
|
||||
require.Equal(t, []string{"linux"}, build.Goos)
|
||||
require.Equal(t, []string{"amd64", "386"}, build.Goarch)
|
||||
require.Equal(t, []string{"amd64", "arm64", "386"}, build.Goarch)
|
||||
require.Equal(t, []string{"6"}, build.Goarm)
|
||||
require.Len(t, build.Ldflags, 1)
|
||||
require.Equal(t, "-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser", build.Ldflags[0])
|
||||
|
@ -70,7 +70,7 @@ builds:
|
||||
|
||||
# GOARCH to build for.
|
||||
# For more info refer to: https://golang.org/doc/install/source#environment
|
||||
# Defaults are 386 and amd64.
|
||||
# Defaults are 386, amd64 and arm64.
|
||||
goarch:
|
||||
- amd64
|
||||
- arm
|
||||
|
Loading…
Reference in New Issue
Block a user