Merge pull request #1844 from hashicorp/b-go-linker-flag

Go's -X linker flag now requires only one argument
This commit is contained in:
James Phillips 2016-03-17 11:06:27 -07:00
commit 0e41fa5340
1 changed files with 4 additions and 4 deletions

View File

@ -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" \
.