From 2bd425b9b1e671e52f1cda35838ec99a901db682 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Thu, 17 Mar 2016 11:57:46 -0700 Subject: [PATCH] Go's -X linker flag now requires only one argument --- scripts/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 90e6b0853..ea1728d37 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -12,8 +12,8 @@ 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_COMMIT="$(git rev-parse HEAD)" +GIT_DIRTY="$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)" # Determine the arch/os combos we're building for XC_ARCH=${XC_ARCH:-"386 amd64 arm"} @@ -39,7 +39,7 @@ gox \ -os="!openbsd" \ -arch="${XC_ARCH}" \ -osarch="!linux/arm !darwin/386" \ - -ldflags "-X main.GitCommit ${GIT_COMMIT}${GIT_DIRTY}" \ + -ldflags "-X main.GitCommit='${GIT_COMMIT}${GIT_DIRTY}'" \ -cgo \ -output "pkg/{{.OS}}_{{.Arch}}/nomad" \ .