Browse Source

remove GitDescribe - no such variable defined in version package

- add "-w -s" flags to reduce binary size (they remove debug info)
pull/923/head
Anton Kaliaev 7 years ago
parent
commit
f30ce8b210
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      scripts/dist_build.sh

+ 3
- 2
scripts/dist_build.sh View File

@ -11,7 +11,6 @@ cd "$DIR"
# Get the git commit
GIT_COMMIT="$(git rev-parse --short HEAD)"
GIT_DESCRIBE="$(git describe --tags --always)"
GIT_IMPORT="github.com/tendermint/tendermint/version"
# Determine the arch/os combos we're building for
@ -25,12 +24,14 @@ make tools
make get_vendor_deps
# Build!
# ldflags: -s Omit the symbol table and debug information.
# -w Omit the DWARF symbol table.
echo "==> Building..."
"$(which gox)" \
-os="${XC_OS}" \
-arch="${XC_ARCH}" \
-osarch="!darwin/arm !solaris/amd64 !freebsd/amd64" \
-ldflags "-X ${GIT_IMPORT}.GitCommit='${GIT_COMMIT}' -X ${GIT_IMPORT}.GitDescribe='${GIT_DESCRIBE}'" \
-ldflags "-s -w -X ${GIT_IMPORT}.GitCommit='${GIT_COMMIT}'" \
-output "build/pkg/{{.OS}}_{{.Arch}}/tendermint" \
-tags="${BUILD_TAGS}" \
github.com/tendermint/tendermint/cmd/tendermint


Loading…
Cancel
Save