diff options
| author | felix <felix> | 2018-06-22 15:15:07 +0000 |
|---|---|---|
| committer | felix <felix> | 2018-06-22 15:15:07 +0000 |
| commit | 2f4f92ffbfcca8b91fc703df595c10e3b4ac67c9 (patch) | |
| tree | a3f4a32e453bdb00289901154f8c9e533b970763 | |
| parent | f5308f149dddc90a0fcd948bb5b5cd8042611eac (diff) | |
| download | migrate-2f4f92ffbfcca8b91fc703df595c10e3b4ac67c9.tar.gz migrate-2f4f92ffbfcca8b91fc703df595c10e3b4ac67c9.tar.bz2 | |
Add basic Makefile
| -rw-r--r-- | Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
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 |
