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 ./...
|
|
|
|
|
2018-09-24 19:07:20 +00:00
|
|
|
checks:
|
|
|
|
golangci-lint run
|
2018-05-30 22:03:55 +00:00
|
|
|
|
|
|
|
check-fmt: SHELL := /bin/bash
|
|
|
|
check-fmt:
|
|
|
|
diff -u <(echo -n) <(gofmt -d $(GOFILES))
|