Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
added makefile job for travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Treml committed Mar 7, 2017
1 parent f907408 commit b825bbb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ install:
- make deps
script:
- make test
- make ci-dist
- make travis-ci-dist
deploy:
provider: releases
skip_cleanup: true
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ help:
@echo "make dev-image - build development image"
@echo "make dockerhub - build and push image to Docker Hub"
@echo "make version - show app version"
@echo "make ci-dist - Build distribution files"
@echo "make travis-ci-dist - Build distribution files with for travis"

build: build-dir
CGO_ENABLED=0 GOOS=$(PLATFORM) GOARCH=$(ARCH) godep go build -ldflags "-X main.Version=$(VERSION) -X main.GitSHA=$(GITSHA)" -o build/$(PROJECT)-$(PLATFORM)-$(ARCH)
Expand Down Expand Up @@ -78,6 +78,15 @@ build-dir:
dist-dir:
@rm -rf dist && mkdir dist

travis-ci-dist: ci-compile dist-dir
$(eval FILES := $(shell ls build))
@for f in $(FILES); do \
(cd $(shell pwd)/build/$$f && tar -cvzf ../../dist/$$f.tar.gz *); \
(cd $(shell pwd)/dist && shasum -a 256 $$f.tar.gz > $$f.sha256); \
(cd $(shell pwd)/dist && md5sum $$f.tar.gz > $$f.md5); \
echo $$f; \
done

ci-dist: ci-compile dist-dir
$(eval FILES := $(shell ls build))
@for f in $(FILES); do \
Expand Down

0 comments on commit b825bbb

Please sign in to comment.