From f30ce8b21024cb3a6d3d82d7b99e8b06213748dd Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 4 Dec 2017 17:39:23 -0600 Subject: [PATCH] remove GitDescribe - no such variable defined in version package - add "-w -s" flags to reduce binary size (they remove debug info) --- scripts/dist_build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/dist_build.sh b/scripts/dist_build.sh index 3e6d5abce..873bacf1b 100755 --- a/scripts/dist_build.sh +++ b/scripts/dist_build.sh @@ -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