Makefile: cleanups for newer versions of Go
Go 1.9 removed "./..." matching the vendor directory while Go 1.10 added build and test caching. This means we no longer need to grep out vendored matches (except for golint which doesn't implement the same behavior), and we no longer need to pre-build packages with "go build -i". https://golang.org/doc/go1.9#vendor-dotdotdot https://golang.org/doc/go1.10#build
This commit is contained in:
parent
8a479707b3
commit
1a565266fc
1 changed files with 5 additions and 9 deletions
14
Makefile
14
Makefile
|
@ -39,23 +39,19 @@ revendor:
|
||||||
@go mod verify
|
@go mod verify
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@go test -v -i $(shell go list ./... | grep -v '/vendor/')
|
@go test -v ./...
|
||||||
@go test -v $(shell go list ./... | grep -v '/vendor/')
|
|
||||||
|
|
||||||
testrace:
|
testrace:
|
||||||
@go test -v -i --race $(shell go list ./... | grep -v '/vendor/')
|
@go test -v --race ./...
|
||||||
@go test -v --race $(shell go list ./... | grep -v '/vendor/')
|
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
@go vet $(shell go list ./... | grep -v '/vendor/')
|
@go vet ./...
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
@./scripts/gofmt $(shell go list ./... | grep -v '/vendor/')
|
@./scripts/gofmt ./...
|
||||||
|
|
||||||
lint: bin/golint
|
lint: bin/golint
|
||||||
@for package in $(shell go list ./... | grep -v '/vendor/' | grep -v '/api' | grep -v '/server/internal'); do \
|
@./bin/golint -set_exit_status $(shell go list ./...)
|
||||||
./bin/golint -set_exit_status $$package $$i || exit 1; \
|
|
||||||
done
|
|
||||||
|
|
||||||
.PHONY: docker-image
|
.PHONY: docker-image
|
||||||
docker-image:
|
docker-image:
|
||||||
|
|
Reference in a new issue