forked from bitcoin-sv/arc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
83 lines (68 loc) · 1.61 KB
/
Copy pathMakefile
File metadata and controls
83 lines (68 loc) · 1.61 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
SHELL=/bin/bash
.PHONY: all
all: deps lint build test
.PHONY: deps
deps:
go mod download
.PHONY: build
build:
sh build.sh
.PHONY: test
test:
go test -race -count=1 ./...
.PHONY: lint
lint:
golangci-lint run --skip-dirs p2p/wire
staticcheck ./...
.PHONY: run
run:
sh run.sh
.PHONY: gen
gen:
protoc \
--proto_path=. \
--go_out=. \
--go_opt=paths=source_relative \
--go-grpc_out=. \
--go-grpc_opt=paths=source_relative \
metamorph/metamorph_api/metamorph_api.proto
protoc \
--proto_path=. \
--go_out=. \
--go_opt=paths=source_relative \
--go-grpc_out=. \
--go-grpc_opt=paths=source_relative \
blocktx/blocktx_api/blocktx_api.proto
protoc \
--proto_path=. \
--go_out=. \
--go_opt=paths=source_relative \
--go-grpc_out=. \
--go-grpc_opt=paths=source_relative \
callbacker/callbacker_api/callbacker_api.proto
.PHONY: clean_gen
clean_gen:
rm -f ./metamorph/metamorph_api/*.pb.go
rm -f ./blocktx/blocktx_api/*.pb.go
rm -f ./callbacker/callbacker_api/*.pb.go
.PHONY: clean
clean:
rm -f ./arc_*.tar.gz
rm -rf build/
.PHONY: install
install:
# arch -arm64 brew install golangci-lint
brew install pre-commit
pre-commit install
go install honnef.co/go/tools/cmd/staticcheck@latest
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
# GO111MODULE=off go get -u github.com/mwitkow/go-proto-validators/protoc-gen-govalidators
.PHONY: docs
docs:
sh generate_docs.sh
gh-pages:
git push --force origin `git subtree split --prefix doc master`:gh-pages
.PHONY: api
api:
oapi-codegen -config api/config.yaml api/arc.yml > api/arc.go