-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
47 lines (34 loc) · 1.26 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
# After the command below: ./gtree template
hotreload:
air
# MEMO: ver/rev を入れて、手動でGitHub releases にアップロードする
# sudo GOOS=wasip1 GOARCH=wasm go build -ldflags '-X main.Version=1.9.6 -X main.Revision=xxx' -o gtree.wasm ./cmd/gtree
wasi:
GOOS=wasip1 GOARCH=wasm go build -o gtree.wasm ./cmd/gtree
sweep:
rm -rf ./root/ ./root1/ ./root2/ ./root3/ ./root4/ ./root5/ ./root6/ ./root7/ ./root8/ Primate/ gtree/
rm -rf ./root_a/ ./root_b/ ./root_c/ ./root_d/ ./root_e/ ./root_f/ ./root_g/ ./root_h/ ./root_i/ ./root_j/
fmt: sweep
go fmt ./...
lint: sweep
golangci-lint run
test: sweep
go clean -testcache
go test . -race -v -count=1
go test ./markdown/... -race -v -count=1
cover: sweep
go test . ./markdown/... -race -coverprofile=coverage.out -covermode=atomic -v
view_cover: sweep cover
go tool cover -html=coverage.out -o coverage.html
bench: sweep
go test -benchmem -bench Benchmark -benchtime 100x benchmark_simple_test.go
go test -benchmem -bench Benchmark -benchtime 100x benchmark_pipeline_test.go
cyclo: sweep
gocyclo .
credit:
gocredits . > CREDITS
tape:
LS_COLORS='di=32:fi=01;34' vhs assets/demo.tape
treemap: cover
go-cover-treemap -statements -coverprofile coverage.out > assets/test_treemap.svg
all: fmt test bench cyclo