-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathmakefile
46 lines (31 loc) · 1.31 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
PROTOC_GEN_GO = $(GOPATH)/bin/protoc-gen-go
PROTOC = $(shell which protoc)
install-goreleaser:
go install github.com/goreleaser/[email protected]
linux: install-goreleaser
GOOS=linux GOARCH=amd64 goreleaser build --snapshot --clean --single-target
windows: install-goreleaser
GOOS=windows GOARCH=amd64 goreleaser build --snapshot --clean --single-target
freebsd: install-goreleaser
GOOS=freebsd GOARCH=amd64 goreleaser build --snapshot --clean --single-target
darwin: install-goreleaser
GOOS=darwin GOARCH=amd64 goreleaser build --snapshot --clean --single-target
buildall: install-goreleaser
goreleaser build --snapshot --clean
release: install-goreleaser
goreleaser release --clean
install-swag:
go install github.com/swaggo/swag/cmd/[email protected]
gen-doc: install-swag
$(shell which swag) init -g main.go --parseDependency --parseInternal --parseDepth 3 --parseGoList=true
serve-doc: gen-doc
go run ./docs.go
test-main:
go test -timeout 99999s main_test.go -v
test-main-rex:
#go test -timeout 99999s main_rex_test.go -v -nodes=3 -posts=2 -timerange=5 -groups=3 -synctime=20 -rextest=true
go test -timeout 99999s main_test.go -v -fullnodes=3 -posts=2 -timerange=5 -groups=3 -synctime=20 -rextest=true
test-api:
go test -v pkg/chainapi/api/*
test: test-api test-main test-main-rex
all: doc test buildall release