Skip to content

Commit

Permalink
travis: fix deploy
Browse files Browse the repository at this point in the history
Signed-off-by: Máximo Cuadros <[email protected]>
  • Loading branch information
mcuadros committed Oct 9, 2017
1 parent a9dd6df commit b58e7a7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
vendor
build
coverage.txt
ostree

# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ script:

after_success:
- bash <(curl -s https://codecov.io/bash)
- make push

before_deploy:
- make push
- make packages

deploy:
provider: releases
api_key:
secure: $GITHUB_TOKEN
file_glob: true
file: ./build/*.tar.gz
skip_cleanup: true
on:
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BUILD_PATH := $(BASE_PATH)/build
CMD_PATH := $(BASE_PATH)/cli

# Build information
BUILD := $(shell date -Iseconds)
BUILD ?= $(shell date -Iseconds)
GIT_COMMIT=$(shell git rev-parse HEAD | cut -c1-7)
GIT_DIRTY=$(shell test -n "`git status --porcelain`" && echo "-dirty" || true)
DEV_PREFIX := dev
Expand All @@ -39,7 +39,7 @@ COVERAGE_PROFILE = profile.out
COVERAGE_MODE = atomic

ifneq ($(origin TRAVIS_TAG), undefined)
COMMIT := $(TRAVIS_TAG)
VERSION := $(TRAVIS_TAG)
endif

# Build
Expand All @@ -48,7 +48,7 @@ LDFLAGS = -X main.version=$(VERSION) -X main.build=$(BUILD)
# Docker
DOCKER_CMD = docker
DOCKER_BUILD = $(DOCKER_CMD) build
DOCKER_RUN = $(DOCKER_CMD) run --rm
DOCKER_RUN = $(DOCKER_CMD) run --rm -e VERSION=$(VERSION) -e BUILD=$(BUILD)
DOCKER_BUILD_IMAGE = bblfshd-build
DOCKER_TAG ?= $(DOCKER_CMD) tag
DOCKER_PUSH ?= $(DOCKER_CMD) push
Expand Down Expand Up @@ -159,6 +159,7 @@ push: docker-image-build
fi;

packages: dependencies docker-build
$(if $(pushdisabled),$(error $(pushdisabled)))
$(DOCKER_RUN) -v $(GOPATH):/go $(DOCKER_BUILD_IMAGE) make packages-internal

packages-internal: $(COMMANDS)
Expand Down

0 comments on commit b58e7a7

Please sign in to comment.