From 2f4f92ffbfcca8b91fc703df595c10e3b4ac67c9 Mon Sep 17 00:00:00 2001 From: felix Date: Fri, 22 Jun 2018 15:15:07 +0000 Subject: Add basic Makefile --- Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..af62b64 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ + +test: ## Run tests and create coverage report + go test -short -coverprofile=coverage.out ./... + go tool cover -html=coverage.out -o coverage.html + +sqlite: + go get -u $(FLAGS) github.com/mattn/go-sqlite3 + go install $(FLAGS) github.com/mattn/go-sqlite3 + +lint: + @for file in $$(find . -name 'vendor' -prune -o -type f -name '*.go'); do \ + golint $$file; done + +clean: ## Clean up temp files and binaries + rm -rf coverage* vendor Gopkg* + +help: + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |sort \ + |awk 'BEGIN{FS=":.*?## "};{printf "\033[36m%-30s\033[0m %s\n",$$1,$$2}' + +.PHONY: help test lint clean -- cgit v1.2.3