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:
parent
df62853c0d
commit
870dc146fa
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user