From f9c0c1548ea68178ab8e8f96dca8040c27ba71b1 Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Thu, 15 Feb 2018 16:32:08 -0600 Subject: [PATCH] Fix bug with prerelease upload --- .travis.yml | 2 +- Makefile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3679c2ec..a3e21f83c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ before_deploy: - pip install awscli --user `whoami` deploy: - provider: script - script: make prerelease-upload + script: make prerelease-upload GOOS=linux GOARCH=amd64 skip_cleanup: true on: all_branches: true diff --git a/Makefile b/Makefile index 8be692b6f..b1b545042 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,8 @@ PKGS := $(shell cd $(GOPATH)/src/$(CLONE_URL); go list ./... | grep -v vendor) BUILD_TIME=`date -u +%FT%T%z` LDFLAGS="-X github.com/pilosa/pilosa.Version=$(VERSION) -X github.com/pilosa/pilosa.BuildTime=$(BUILD_TIME)" DOCKER_GOLANG_IMAGE=golang:latest -BRANCH=$(shell git rev-parse --abbrev-ref HEAD) +GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) +BRANCH := $(if $(TRAVIS_BRANCH),$(TRAVIS_BRANCH),$(GIT_BRANCH)) BRANCH_IDENTIFIER := $(BRANCH)-$(GOOS)-$(GOARCH) default: test pilosa