From 368d26cdd6ac182ed02701fcc694d748239841d8 Mon Sep 17 00:00:00 2001 From: Felix Hanley Date: Sat, 8 Feb 2020 21:47:16 +1100 Subject: Check for zero migrations --- Makefile | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e99cc0a..3750053 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,13 @@ -GOPATH?= $(HOME)/go - .PHONY: test -test: lint ## Run tests and create coverage report - go test -short -coverprofile=coverage.txt -covermode=atomic ./... - go tool cover -html=coverage.txt -o coverage.html +test: lint + go test -short -coverprofile=coverage.txt -covermode=atomic ./... \ + && go tool cover -html=coverage.txt -o coverage.html .PHONY: lint -lint: $(GOPATH)/bin/golint ## Run the code linter - @for file in $$(find . -name 'vendor' -prune -o -type f -name '*.go'); do \ - golint $$file; done - -$(GOPATH)/bin/golint: - go get -u golang.org/x/lint/golint +lint: + go vet ./... .PHONY: clean -clean: ## Clean up temp files and binaries - @rm -rf coverage* - -.PHONY: help -help: - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |sort \ - |awk 'BEGIN{FS=":.*?## "};{printf "\033[36m%-30s\033[0m %s\n",$$1,$$2}' +clean: + rm -rf coverage* -- cgit v1.2.3