diff --git a/scripts/build b/scripts/build index 7b7a588399d90a6dc6af1c2c404fc2b5d177a3f7..5d5218fb033956563e5284aa1387791dcccaa83f 100755 --- a/scripts/build +++ b/scripts/build @@ -7,10 +7,9 @@ cd $(dirname $0)/.. mkdir -p bin if [ "$(uname)" = "Linux" ]; then - OTHER_LINKFLAGS="-extldflags -static -s" + OTHER_LINKFLAGS="-extldflags -static -s -w" fi -LINKFLAGS="-X github.com/rancher/local-path-provisioner.Version=$VERSION" -LINKFLAGS="-X github.com/rancher/local-path-provisioner.GitCommit=$COMMIT $LINKFLAGS" +LINKFLAGS="-X main.VERSION=$VERSION" CGO_ENABLED=0 go build -ldflags "$LINKFLAGS $OTHER_LINKFLAGS" -o bin/local-path-provisioner if [ "$CROSS" = "true" ] && [ "$ARCH" = "amd64" ]; then GOOS=darwin go build -ldflags "$LINKFLAGS" -o bin/local-path-provisioner-darwin