2018-05-29 17:40:00 +00:00
|
|
|
.PHONY: all
|
|
|
|
|
2018-05-30 22:03:55 +00:00
|
|
|
GOFILES := $(shell go list -f '{{range $$index, $$element := .GoFiles}}{{$$.Dir}}/{{$$element}}{{"\n"}}{{end}}' ./... | grep -v '/vendor/')
|
2018-05-29 17:40:00 +00:00
|
|
|
|
2018-05-30 22:03:55 +00:00
|
|
|
default: clean checks test build
|
2018-05-29 17:40:00 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf dist/ builds/ cover.out
|
|
|
|
|
|
|
|
build: clean
|
|
|
|
go build
|
2018-05-30 22:03:55 +00:00
|
|
|
|
2018-05-30 22:28:41 +00:00
|
|
|
|
|
|
|
dependencies:
|
|
|
|
dep ensure -v
|
|
|
|
|
2018-05-30 22:03:55 +00:00
|
|
|
test: clean
|
|
|
|
go test -v -cover ./...
|
|
|
|
|
|
|
|
checks: check-fmt
|
|
|
|
gometalinter ./...
|
|
|
|
|
|
|
|
check-fmt: SHELL := /bin/bash
|
|
|
|
check-fmt:
|
|
|
|
diff -u <(echo -n) <(gofmt -d $(GOFILES))
|