[build] Add gofmt-related Makefile targets

This adds `verify-gofmt` and `gofmt` make targets for quick go-fmting.
It also adds a `verify` target which verifies `gofmt` and the runs the
unit tests.

Travis now runs `make verify` instead of just `make test` as the tests.
This commit is contained in:
Solly Ross 2017-06-27 18:25:35 -04:00
parent bbf23f18d0
commit 417f5a9f99
3 changed files with 51 additions and 2 deletions

View file

@ -24,7 +24,7 @@ ifeq ($(ARCH),s390x)
BASEIMAGE?=s390x/busybox
endif
.PHONY: all build docker-build push-% push test
.PHONY: all build docker-build push-% push test verify-gofmt gofmt verify
all: build
build: vendor
@ -56,3 +56,11 @@ vendor: glide.lock
test: vendor
CGO_ENABLED=0 go test ./pkg/...
verify-gofmt:
./hack/gofmt-all.sh -v
gofmt:
./hack/gofmt-all.sh
verify: verify-gofmt test