diff --git a/.travis.yml b/.travis.yml index 4e72ca3..b4fad9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,11 @@ before_script: - golint -set_exit_status ./... - go vet ./... | grep ':' && false || true - go test -v -cover ./... - - if [ -n "$TRAVIS_TAG" ]; then go install github.com/jtyr/gbt/cmd/gbt && $GOPATH/bin/gbt -version | egrep " $TRAVIS_TAG, build ${TRAVIS_COMMIT::6}\$"; fi + - >- + if [ -n "$TRAVIS_TAG" ]; then + CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=${TRAVIS_TAG:1} -X main.build=${TRAVIS_COMMIT::6}" -o $GOPATH/bin/gbt ./cmd/gbt; + $GOPATH/bin/gbt -version | egrep " ${TRAVIS_TAG:1}, build ${TRAVIS_COMMIT::6}\$"; + fi script: - go install github.com/jtyr/gbt/cmd/gbt