aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml1
-rw-r--r--Makefile21
2 files changed, 14 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index 9de81ec..e108b17 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,4 +7,3 @@ go:
7 7
8script: 8script:
9- make 9- make
10- ./end-to-end-test.sh
diff --git a/Makefile b/Makefile
index c0dfe7d..741f4a9 100644
--- a/Makefile
+++ b/Makefile
@@ -13,8 +13,10 @@
13 13
14GO ?= GO15VENDOREXPERIMENT=1 go 14GO ?= GO15VENDOREXPERIMENT=1 go
15GOPATH := $(firstword $(subst :, ,$(GOPATH))) 15GOPATH := $(firstword $(subst :, ,$(GOPATH)))
16PROMU ?= $(GOPATH)/bin/promu 16
17pkgs = $(shell $(GO) list ./... | grep -v /vendor/) 17PROMU ?= $(GOPATH)/bin/promu
18STATICCHECK ?= $(GOPATH)/bin/staticcheck
19pkgs = $(shell $(GO) list ./... | grep -v /vendor/)
18 20
19PREFIX ?= $(shell pwd) 21PREFIX ?= $(shell pwd)
20BIN_DIR ?= $(shell pwd) 22BIN_DIR ?= $(shell pwd)
@@ -33,7 +35,7 @@ else
33 test-e2e := skip-test-e2e 35 test-e2e := skip-test-e2e
34endif 36endif
35 37
36all: format build test $(test-e2e) 38all: format vet staticcheck build test $(test-e2e)
37 39
38style: 40style:
39 @echo ">> checking code style" 41 @echo ">> checking code style"
@@ -58,6 +60,10 @@ vet:
58 @echo ">> vetting code" 60 @echo ">> vetting code"
59 @$(GO) vet $(pkgs) 61 @$(GO) vet $(pkgs)
60 62
63staticcheck: $(STATICCHECK)
64 @echo ">> running staticcheck"
65 @$(STATICCHECK) $(pkgs)
66
61build: $(PROMU) 67build: $(PROMU)
62 @echo ">> building binaries" 68 @echo ">> building binaries"
63 @$(PROMU) build --prefix $(PREFIX) 69 @$(PROMU) build --prefix $(PREFIX)
@@ -71,9 +77,10 @@ docker:
71 @docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" . 77 @docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" .
72 78
73$(GOPATH)/bin/promu promu: 79$(GOPATH)/bin/promu promu:
74 @GOOS=$(shell uname -s | tr A-Z a-z) \ 80 @GOOS= GOARCH= $(GO) get -u github.com/prometheus/promu
75 GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \ 81
76 $(GO) get -u github.com/prometheus/promu 82$(GOPATH)/bin/staticcheck:
83 @GOOS= GOARCH= $(GO) get -u honnef.co/go/tools/cmd/staticcheck
77 84
78 85
79.PHONY: all style format build test test-e2e vet tarball docker promu $(GOPATH)/bin/promu 86.PHONY: all style format build test test-e2e vet tarball docker promu staticcheck $(GOPATH)/bin/promu $(GOPATH)/bin/staticcheck