Go's -X linker flag now requires only one argument

This commit is contained in:
Sean Chittenden 2016-03-17 10:51:50 -07:00
parent 0ed56d6606
commit 0f3331cc06
1 changed files with 4 additions and 4 deletions

View File

@ -15,9 +15,9 @@ DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
cd "$DIR" cd "$DIR"
# Get the git commit # Get the git commit
GIT_COMMIT=$(git rev-parse HEAD) GIT_COMMIT="$(git rev-parse HEAD)"
GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "+CHANGES" || true) GIT_DIRTY="$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)"
GIT_DESCRIBE=$(git describe --tags) GIT_DESCRIBE="$(git describe --tags)"
# Determine the arch/os combos we're building for # Determine the arch/os combos we're building for
XC_ARCH=${XC_ARCH:-"386 amd64 arm"} XC_ARCH=${XC_ARCH:-"386 amd64 arm"}
@ -40,7 +40,7 @@ echo "==> Building..."
$GOPATH/bin/gox \ $GOPATH/bin/gox \
-os="${XC_OS}" \ -os="${XC_OS}" \
-arch="${XC_ARCH}" \ -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" \ -output "pkg/{{.OS}}_{{.Arch}}/consul" \
. .