makefile with travis

pull/41/head^2
Hunter Long 2018-08-13 22:59:51 -07:00
parent 92c7ebf23c
commit 47805d086d
2 changed files with 5 additions and 7 deletions

View File

@ -18,7 +18,6 @@ services:
env: env:
global: global:
- VERSION=0.37
- DB_HOST=localhost - DB_HOST=localhost
- DB_USER=travis - DB_USER=travis
- DB_PASS= - DB_PASS=
@ -59,6 +58,7 @@ before_script:
- make deps - make deps
script: script:
- make install
- make test - make test
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then make coverage; fi - if [[ "$TRAVIS_BRANCH" == "master" ]]; then make coverage; fi

View File

@ -1,4 +1,5 @@
VERSION=0.37 VERSION=0.37
GOPATH:=$(GOPATH)
GOCMD=`which go` GOCMD=`which go`
GOBUILD=$(GOCMD) build GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean GOCLEAN=$(GOCMD) clean
@ -8,6 +9,7 @@ GOINSTALL=$(GOCMD) install
XGO=GOPATH=$(GOPATH) $(GOPATH)/bin/xgo -go 1.10.x --dest=build XGO=GOPATH=$(GOPATH) $(GOPATH)/bin/xgo -go 1.10.x --dest=build
BUILDVERSION=-ldflags="-X main.VERSION=$(VERSION)" BUILDVERSION=-ldflags="-X main.VERSION=$(VERSION)"
BINARY_NAME=statup BINARY_NAME=statup
RICE=$(GOPATH)/bin/rice
DOCKER=`which docker` DOCKER=`which docker`
PATH:=/usr/local/bin:$(GOPATH)/bin:$(PATH) PATH:=/usr/local/bin:$(GOPATH)/bin:$(PATH)
@ -76,12 +78,8 @@ deps:
$(GOGET) github.com/karalabe/xgo $(GOGET) github.com/karalabe/xgo
$(GOGET) github.com/GeertJohan/go.rice $(GOGET) github.com/GeertJohan/go.rice
$(GOGET) github.com/GeertJohan/go.rice/rice $(GOGET) github.com/GeertJohan/go.rice/rice
cd cmd && $(GOGET) $(GOINSTALL) github.com/GeertJohan/go.rice/rice
cd notifiers && $(GOGET) $(GOGET) -d ./...
cd handlers && $(GOGET)
cd core && $(GOGET)
cd types && $(GOGET)
cd utils && $(GOGET)
clean: clean:
rm -rf build rm -rf build