-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
52 lines (40 loc) · 1.08 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
GO_VERSION:=$(shell go version)
.PHONY: all clean bench bench-all profile lint test contributors update install upgrade
all: clean install lint test bench
clean:
go clean ./...
go clean -modcache
rm -rf ./*.log
rm -rf ./*.svg
rm -rf ./go.mod
rm -rf ./go.sum
rm -rf bench
rm -rf pprof
rm -rf vendor
bench: clean init
go test -count=5 -run=NONE -bench . -benchmem
init:
GO111MODULE=on go mod init
GO111MODULE=on go mod vendor
sleep 3
deps: clean
GO111MODULE=on go mod init
GO111MODULE=on go mod vendor
rm -rf vendor
lint:
gometalinter --enable-all . | rg -v comment
test: clean init
GO111MODULE=on go test --race -v ./...
contributors:
git log --format='%aN <%aE>' | sort -fu > CONTRIBUTORS
coverage:
go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
rm -f coverage.out
upgrade:
go list -u -m all
go get -t -u ./...
check-license-header:
# go install github.com/apache/skywalking-eyes/cmd/license-eye@latest
license-eye -c .licenserc.yaml header check
# license-eye -c .licenserc.yaml header fix