-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
52 lines (40 loc) · 923 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
SHELL = bash -o pipefail
TEST_FLAGS ?= -p 1 -v -race
all:
@echo "make <cmd>"
@echo ""
@echo "commands:"
@echo ""
@echo " + Development:"
@echo " - build"
@echo " - test"
@echo " - todo"
@echo " - clean"
@echo ""
@echo ""
@echo " + Database stuff:"
@echo " - db-reset"
@echo " - db-create"
@echo " - db-drop"
@echo ""
##
## Development
##
build:
go build ./...
clean:
go clean -cache -testcache
test: test-clean
GOGC=off go test $(TEST_FLAGS) $(MOD_VENDOR) -run=$(TEST) ./...
test-all: test-clean
GOGC=off go test $(TEST_FLAGS) $(MOD_VENDOR) -run=$(TEST) ./...
test-with-reset: db-reset test-all
test-clean:
GOGC=off go clean -testcache && rm -rf test_db tmp_db
bench:
@cd _benchmarks && go test -timeout=25m -bench=.
todo:
@git grep TODO -- './*' ':!./vendor/' ':!./Makefile' || :
.PHONY: pb
pb:
protoc -I=./tests/pb --go_out=./tests ./tests/pb/demo.proto