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 authored and w13915984028 committed Dec 9, 2024
1 parent a81908a commit 93bc85a
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 @@ -9,6 +9,6 @@ mkdir -p bin
[ "$(uname)" != "Darwin" ] && LINKFLAGS="-extldflags -static -s"

for arch in "amd64" "arm64"; do
GOARCH="$arch" CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/harvester-load-balancer-"$arch" main.go
GOARCH="$arch" CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/harvester-load-balancer-webhook-"$arch" cmd/webhook/main.go
GOARCH="$arch" CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/harvester-load-balancer-"$arch"
GOARCH="$arch" CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/harvester-load-balancer-webhook-"$arch" ./cmd/webhook
done

0 comments on commit 93bc85a

Please sign in to comment.