2018-05-29 19:40:00 +02:00
|
|
|
.PHONY: all
|
|
|
|
|
2018-05-31 00:03:55 +02:00
|
|
|
GOFILES := $(shell go list -f '{{range $$index, $$element := .GoFiles}}{{$$.Dir}}/{{$$element}}{{"\n"}}{{end}}' ./... | grep -v '/vendor/')
|
2018-05-29 19:40:00 +02:00
|
|
|
|
2018-05-31 00:03:55 +02:00
|
|
|
default: clean checks test build
|
2018-05-29 19:40:00 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf dist/ builds/ cover.out
|
|
|
|
|
|
|
|
build: clean
|
|
|
|
go build
|
2018-05-31 00:03:55 +02:00
|
|
|
|
2018-05-31 00:28:41 +02:00
|
|
|
|
|
|
|
dependencies:
|
|
|
|
dep ensure -v
|
|
|
|
|
2018-05-31 00:03:55 +02: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))
|