mirror of https://github.com/status-im/consul.git
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:
commit
0e41fa5340
|
@ -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" \
|
||||
.
|
||||
|
||||
|
|
Loading…
Reference in New Issue