-
Notifications
You must be signed in to change notification settings - Fork 25
/
Makefile
56 lines (38 loc) · 984 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
default: build
clean:
rm -fr dist ui/build ui/node_modules slrp main
cp ui/src/favicon.ico ui/build/favicon.ico
build-ui:
npm --prefix ui run build
dev-ui:
npm --prefix ui start
fmt-ui:
npm --prefix ui run prettier
snapshot: build-ui
goreleaser build --snapshot --rm-dist --single-target
build: build-ui
go mod vendor
go build -ldflags "-s -w" main.go
quick:
go build
fmt:
go fmt ./...
profiled: quick
SLRP_PPROF_ENABLE=true slrp
heap-profile:
go tool pprof http://localhost:6060/debug/pprof/heap
cpu-profile:
go tool pprof http://localhost:6060/debug/pprof/profile?seconds=60
block-profile:
go tool pprof http://localhost:6060/debug/pprof/block
pprof:
go tool pprof -http=:8080 slrp http://127.0.0.1:6060/debug/pprof/profile
race:
GORACE="halt_on_error=1" go run -race main.go
vendor:
go mod vendor
test:
go test ./... -coverprofile=coverage.txt -timeout=30s
coverage: test
go tool cover -html=coverage.txt
.PHONY: build fmt coverage test vendor