diff --git a/internal/buildtarget/targets.go b/internal/buildtarget/targets.go index 519d73215..94de6560c 100644 --- a/internal/buildtarget/targets.go +++ b/internal/buildtarget/targets.go @@ -40,10 +40,16 @@ func allBuildTargets(build config.Build) (targets []Target) { func ignored(build config.Build, target Target) bool { for _, ig := range build.Ignore { - var ignored = New(ig.Goos, ig.Goarch, ig.Goarm) - if ignored == target { - return true + if ig.Goos != "" && ig.Goos != target.OS { + continue } + if ig.Goarch != "" && ig.Goarch != target.Arch { + continue + } + if ig.Goarm != "" && ig.Goarm != target.Arm { + continue + } + return true } return false } diff --git a/internal/buildtarget/targets_test.go b/internal/buildtarget/targets_test.go index 1cad7c469..feb7d7916 100644 --- a/internal/buildtarget/targets_test.go +++ b/internal/buildtarget/targets_test.go @@ -15,6 +15,7 @@ func TestAllBuildTargets(t *testing.T) { "linux", "darwin", "freebsd", + "openbsd", }, Goarch: []string{ "386", @@ -34,6 +35,9 @@ func TestAllBuildTargets(t *testing.T) { Goos: "linux", Goarch: "arm", Goarm: "7", + }, { + Goos: "openbsd", + Goarch: "arm", }, }, } @@ -47,6 +51,8 @@ func TestAllBuildTargets(t *testing.T) { New("freebsd", "amd64", ""), New("freebsd", "arm", "6"), New("freebsd", "arm", "7"), + New("openbsd", "386", ""), + New("openbsd", "amd64", ""), }, All(build)) }