Skip to content

Commit

Permalink
Make the build consistent across archs for Go to correctly report the…
Browse files Browse the repository at this point in the history
… package path inside the binary

Signed-off-by: Guilherme Macedo <[email protected]>
  • Loading branch information
macedogm committed Nov 28, 2024
1 parent 3479c9f commit c2ae717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ cd $(dirname $0)/..

TAGS="netcgo osusergo static_build"
LDFLAGS="-w -s -X main.version=$VERSION"
CGO_ENABLED=0 go build -v -tags "$TAGS" -ldflags "$LDFLAGS" -o bin/wharfie-amd64 ./main.go
CGO_ENABLED=0 go build -v -tags "$TAGS" -ldflags "$LDFLAGS" -o bin/wharfie-amd64

if [ "$CROSS" = "true" ] && [ "$ARCH" = "amd64" ]; then
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -tags "$TAGS" -ldflags "$LDFLAGS" -o bin/wharfie-arm64
fi
fi

0 comments on commit c2ae717

Please sign in to comment.