1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-07 13:31:37 +02:00

fix: universal binary should be in dist/$x_darwin_all dir

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos A Becker 2021-10-14 22:33:52 -03:00
parent df62853c0d
commit 870dc146fa
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 3 additions and 1 deletions

View File

@ -79,7 +79,7 @@ func makeUniversalBinary(ctx *context.Context, unibin config.UniversalBinary) er
return err
}
path := filepath.Join(ctx.Config.Dist, name+"_darwinall", name)
path := filepath.Join(ctx.Config.Dist, name+"_darwin_all", name)
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
return err
}

View File

@ -5,6 +5,7 @@ import (
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
"time"
@ -216,6 +217,7 @@ func TestRun(t *testing.T) {
func checkUniversalBinary(tb testing.TB, unibin *artifact.Artifact) {
tb.Helper()
require.True(tb, strings.HasSuffix(unibin.Path, "foo_darwin_all/foo"))
f, err := macho.OpenFat(unibin.Path)
require.NoError(tb, err)
require.Len(tb, f.Arches, 2)