From 851be7830ecabc5800c952d77fd03c9a9976063b Mon Sep 17 00:00:00 2001 From: Darren Shepherd <darren@rancher.com> Date: Thu, 26 Sep 2019 22:01:30 -0700 Subject: [PATCH] Fix VERSION symbol --- scripts/build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/build b/scripts/build index 7b7a588..5d5218f 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 -- GitLab