From ea6f8fce95eecb28d41135908b491728a3b082d6 Mon Sep 17 00:00:00 2001 From: Guilherme Macedo Date: Fri, 29 Nov 2024 10:33:57 -0300 Subject: [PATCH] Make the build consistent across archs for Go to correctly report the package path inside the binary Signed-off-by: Guilherme Macedo --- scripts/build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build b/scripts/build index 123a9376..568b6822 100755 --- a/scripts/build +++ b/scripts/build @@ -8,7 +8,7 @@ cd $(dirname $0)/.. mkdir -p bin for arch in "amd64" "arm64"; do - GOARCH="$arch" CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/harvester-network-controller-"$arch" cmd/network-controller/main.go - GOARCH="$arch" CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/harvester-network-helper-"$arch" cmd/network-helper/main.go - GOARCH="$arch" CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/harvester-network-webhook-"$arch" cmd/webhook/main.go + GOARCH="$arch" CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/harvester-network-controller-"$arch" ./cmd/network-controller + GOARCH="$arch" CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/harvester-network-helper-"$arch" ./cmd/network-helper + GOARCH="$arch" CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/harvester-network-webhook-"$arch" ./cmd/webhook done