-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
41 lines (34 loc) · 923 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
35
36
37
38
39
40
41
.PHONY: test
test:
go test -race -count=1 ./...
.PHONY: build
build:
go build ./...
.PHONY: tools
tools:
go generate -tags tools tools/tools.go
go install github.com/hashicorp/[email protected]
.PHONY: fmt
fmt:
gofumpt -w $$(find . -name '*.go')
.PHONY: gen
gen: fmt copywrite
# coverage-diff will run a new coverage report and check coverage.log to see if
# the coverage has changed.
.PHONY: coverage-diff
coverage-diff:
cd coverage && \
./coverage.sh && \
./cov-diff.sh coverage.log && \
if ./cov-diff.sh ./coverage.log; then git restore coverage.log; fi
# coverage will generate a report, badge and log. when you make changes, run
# this and check in the changes to publish a new/latest coverage report and
# badge.
.PHONY: coverage
coverage:
cd coverage && \
./coverage.sh && \
if ./cov-diff.sh ./coverage.log; then git restore coverage.log; fi
.PHONY: copywrite
copywrite:
copywrite headers