Adjusts path for injected GIT_* variables.
This fixes #2486 and was broken when we refactored for build tags.
This commit is contained in:
parent
e01fde4007
commit
c8ec80b2b9
|
@ -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}" \
|
||||
.
|
||||
|
|
Loading…
Reference in New Issue