From 96c6b4f3316ca570a68d13bc440ab28f2be3b951 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Thu, 17 Mar 2016 10:51:50 -0700 Subject: [PATCH] Go's -X linker flag now requires only one argument --- scripts/build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 543b22b99f..ed0dc6ef4e 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -15,9 +15,9 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )" cd "$DIR" # Get the git commit -GIT_COMMIT=$(git rev-parse HEAD) -GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true) -GIT_DESCRIBE=$(git describe --tags) +GIT_COMMIT="$(git rev-parse HEAD)" +GIT_DIRTY="$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)" +GIT_DESCRIBE="$(git describe --tags)" # Determine the arch/os combos we're building for XC_ARCH=${XC_ARCH:-"386 amd64 arm"} @@ -40,7 +40,7 @@ echo "==> Building..." $GOPATH/bin/gox \ -os="${XC_OS}" \ -arch="${XC_ARCH}" \ - -ldflags "-X main.GitCommit ${GIT_COMMIT}${GIT_DIRTY} -X main.GitDescribe ${GIT_DESCRIBE}" \ + -ldflags "-X main.GitCommit='${GIT_COMMIT}${GIT_DIRTY}' -X main.GitDescribe='${GIT_DESCRIBE}'" \ -output "pkg/{{.OS}}_{{.Arch}}/consul" \ .