forked from chanzuckerberg/go-misc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (23 loc) · 860 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
LDFLAGS=-ldflags ""
all: test
setup:
go get github.com/rakyll/gotest
go install github.com/rakyll/gotest
go get golang.org/x/tools/cover
lint: ## run the fast go linters
gometalinter --vendor --fast ./...
lint-slow: ## run all linters, even the slow ones
gometalinter --vendor --deadline 120s ./...
build: ## build the binary
go build ${LDFLAGS} .
update-cover:
@go run _bin/coverage/main.go -update -exclude ./
enforce-cover:
@go run _bin/coverage/main.go -enforce -exclude ./
test: ## run the tests
gotest -cover ./...
install: ## install the fogg binary in $GOPATH/bin
go install ${LDFLAGS} .
help: ## display help for this makefile
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: build coverage test install lint lint-slow release help