You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-11-06 09:09:29 +02:00
feat: removed deprecated windows arm handling on go 1.16 (#3157)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1723e88dcd
commit
0f128690a0
@@ -6,11 +6,9 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/fatih/color"
|
||||
"github.com/goreleaser/goreleaser/pkg/config"
|
||||
)
|
||||
|
||||
@@ -55,13 +53,6 @@ func matrix(build config.Build, version []byte) ([]string, error) {
|
||||
if target.amd64 != "" && !contains(target.amd64, validGoamd64) {
|
||||
return result, fmt.Errorf("invalid goamd64: %s", target.amd64)
|
||||
}
|
||||
if target.os == "windows" && target.arch == "arm64" && !go117re.Match(version) {
|
||||
log.Warn(color.New(color.Bold, color.FgHiYellow).Sprintf(
|
||||
"DEPRECATED: skipped windows/arm64 build on Go < 1.17 for compatibility, check %s for more info.",
|
||||
"https://goreleaser.com/deprecations/#builds-for-windowsarm64",
|
||||
))
|
||||
continue
|
||||
}
|
||||
if !valid(target) {
|
||||
log.WithField("target", target).Debug("skipped invalid build")
|
||||
continue
|
||||
@@ -144,8 +135,6 @@ func ignored(build config.Build, target target) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
var go117re = regexp.MustCompile(`go version go1.1[7-9]`)
|
||||
|
||||
func goVersion(build config.Build) ([]byte, error) {
|
||||
cmd := exec.Command(build.GoBinary, "version")
|
||||
// If the build.Dir is acessible, set the cmd dir to it in case
|
||||
|
||||
@@ -66,49 +66,6 @@ func TestAllBuildTargets(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
t.Run("go 1.16", func(t *testing.T) {
|
||||
result, err := matrix(build, []byte("go version go1.16.2"))
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, []string{
|
||||
"linux_386",
|
||||
"linux_amd64_v1",
|
||||
"linux_amd64_v2",
|
||||
"linux_amd64_v4",
|
||||
"linux_arm_6",
|
||||
"linux_arm64",
|
||||
"linux_mips_hardfloat",
|
||||
"linux_mips_softfloat",
|
||||
"linux_mips64_softfloat",
|
||||
"linux_mipsle_hardfloat",
|
||||
"linux_mipsle_softfloat",
|
||||
"linux_mips64le_hardfloat",
|
||||
"linux_riscv64",
|
||||
"darwin_amd64_v1",
|
||||
"darwin_amd64_v2",
|
||||
"darwin_amd64_v4",
|
||||
"darwin_arm64",
|
||||
"freebsd_386",
|
||||
"freebsd_amd64_v1",
|
||||
"freebsd_amd64_v2",
|
||||
"freebsd_amd64_v4",
|
||||
"freebsd_arm_6",
|
||||
"freebsd_arm_7",
|
||||
"freebsd_arm64",
|
||||
"openbsd_386",
|
||||
"openbsd_amd64_v1",
|
||||
"openbsd_amd64_v2",
|
||||
"openbsd_amd64_v4",
|
||||
"openbsd_arm64",
|
||||
"windows_386",
|
||||
"windows_amd64_v1",
|
||||
"windows_amd64_v2",
|
||||
"windows_amd64_v4",
|
||||
"windows_arm_6",
|
||||
"windows_arm_7",
|
||||
"js_wasm",
|
||||
}, result)
|
||||
})
|
||||
|
||||
t.Run("go 1.18", func(t *testing.T) {
|
||||
result, err := matrix(build, []byte("go version go1.18.0"))
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user