Adjusts path for injected GIT_* variables.

This fixes #2486 and was broken when we refactored for build tags.
This commit is contained in:
James Phillips 2016-11-08 18:35:25 -08:00
parent e01fde4007
commit c8ec80b2b9
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ cd "$DIR"
GIT_COMMIT="$(git rev-parse --short HEAD)"
GIT_DIRTY="$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)"
GIT_DESCRIBE="$(git describe --tags --always)"
GIT_IMPORT="github.com/hashicorp/consul/version"
# Determine the arch/os combos we're building for
XC_ARCH=${XC_ARCH:-"386 amd64 arm"}
@ -40,7 +41,7 @@ echo "==> Building..."
-os="${XC_OS}" \
-arch="${XC_ARCH}" \
-osarch="!darwin/arm" \
-ldflags "-X main.GitCommit='${GIT_COMMIT}${GIT_DIRTY}' -X main.GitDescribe='${GIT_DESCRIBE}'" \
-ldflags "-X ${GIT_IMPORT}.GitCommit='${GIT_COMMIT}${GIT_DIRTY}' -X ${GIT_IMPORT}.GitDescribe='${GIT_DESCRIBE}'" \
-output "pkg/{{.OS}}_{{.Arch}}/consul" \
-tags="${BUILD_TAGS}" \
.