-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile
72 lines (58 loc) · 2.32 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
68
69
70
71
72
clean_ffjson_base:
@rm -rf types/ffjson-inception* ||:
@rm -f types/*_ffjson_expose.go ||:
@rm -rf operations/ffjson-inception* ||:
@rm -f operations/*_ffjson_expose.go ||:
@rm -rf api/ffjson-inception* ||:
@rm -f api/*_ffjson_expose.go ||:
clean_ffjson_gen:
@rm -rf types/*_ffjson.go ||:
@rm -rf operations/*_ffjson.go ||:
@rm -rf api/*_ffjson.go ||:
generate: clean_ffjson_base
@echo "######################## -> generate ObjectIDs"
-@go generate types/gen.go
@echo "######################## -> generate ffjson stuff"
-@go generate ./...
generate_new: clean_ffjson_base clean_ffjson_gen
@echo "######################## -> generate new"
-@go generate types/gen.go
-@go generate ./...
init:
@echo "######################## -> install/update dev dependencies"
@GO111MODULE=on go get -u golang.org/x/tools/cmd/stringer
@GO111MODULE=on go get -u github.com/cheekybits/genny
@GO111MODULE=on go get -u github.com/pquerna/ffjson
@GO111MODULE=on go get -u github.com/mitchellh/reflectwalk
@GO111MODULE=on go get -u github.com/stretchr/objx
@GO111MODULE=on go get -u github.com/stretchr/testify
@GO111MODULE=on go get -u github.com/cheggaaa/pb
@GO111MODULE=on go get -u github.com/cespare/reflex
@GO111MODULE=on go get -u github.com/bradhe/stopwatch
test: test_operations test_api
test_api:
@echo "######################## -> test bitshares api"
-@GO111MODULE=on go test -cover -v ./tests -run ^TestCommon$
-@GO111MODULE=on go test -cover -v ./tests -run ^TestSubscribe$
-@GO111MODULE=on go test -cover -v ./tests -run ^TestWalletAPI$
-@GO111MODULE=on go test -cover -v ./tests -run ^TestWebsocketAPI$
-@GO111MODULE=on go test -cover -v ./types
test_operations:
@echo "######################## -> test operations"
@GO111MODULE=on go test -cover -v ./tests -run ^TestOperations$
test_blocks:
@echo "this is a long running test, abort with Ctrl + C"
@GO111MODULE=on go test -v ./tests -timeout 10m -run ^TestBlockRange$
buildgen:
@echo "######################## -> build btsgen"
@cd ./gen && go get -u -d
@cd ./gen && go build -o /tmp/btsgen
@cp /tmp/btsgen $(GOPATH)/bin
opsamples: buildgen
@echo "######################## -> exec btsgen"
@cd ./gen && btsgen
build: generate
@echo "######################## -> build"
go build -o /tmp/go-tmpbuild ./operations
watch:
reflex -g 'operations/*.go' make test_operations