-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
67 lines (51 loc) · 1.53 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
VERSION = "0.0.1"
change-version:
@echo $(VERSION)>VERSION
@echo "package constant\n\n//Version constant of abesh\nconst Version = \"$(VERSION)\"">constant/version.go
@git add VERSION
@git add constant/version.go
@git commit -m "v$(VERSION)"
@git tag -a "v$(VERSION)" -m "v$(VERSION)"
@git push origin
@git push origin "v$(VERSION)"
update-module:
go get -v github.com/spf13/cobra
go get -v go.uber.org/zap
go get -v github.com/caarlos0/env/v6
go get -v gopkg.in/yaml.v2
go get -v google.golang.org/protobuf/proto
protoc:
@protoc \
-I=./proto \
--go_opt=module=github.com/mkawserm/abesh \
--go_out=. \
./proto/model/metadata.proto \
./proto/model/event.proto \
./proto/model/status.proto \
./proto/model/error.proto
build-default:
go build -o bin/abesh main/default/main.go
run-default:
go run main/default/main.go run --manifest example/manifest.yaml
run-embedded-print-manifest:
go run main/embedded/main.go embedded print-manifest
run-embedded:
go run main/embedded/main.go embedded run
run-embedded2:
go run main/embedded/main.go embedded-run2
run-race:
go run -race main/embedded/main.go embedded run
test:
go test ./... -v
cover:
go test ./... -coverprofile=cover.out -v
cover-html:
go tool cover -html=cover.out
profile-heap:
go tool pprof http://localhost:6060/debug/pprof/heap
profile-cpu:
go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30
profile-block:
go tool pprof http://localhost:6060/debug/pprof/block
profile-mutex:
go tool pprof http://localhost:6060/debug/pprof/mutex