-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
50 lines (44 loc) · 1.27 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
.PHONY:build
build:
go build .
# for playground
# build gomockhandler and generate gomockhandler.json with it.
.PHONY:playground
playground:
go build . ;\
cd playground ;\
go generate ./...; \
rm ../gomockhandler;
# for playground
# build gomockhandler and generate mocks with it.
# It use gomockhandler.json on /playground dir. So you may have to run make playground first.
.PHONY:playground-gen
playground-gen:
go build . ;\
cd playground ;\
../gomockhandler -config=gomockhandler.json mockgen ;\
rm ../gomockhandler;
# test on playground
# build gomockhandler and check mocks with it.
# It use gomockhandler.json on /playground dir. So you may have to run make playground first.
.PHONY:playground-check
playground-check:
go build . ;\
cd playground ;\
../gomockhandler -config=gomockhandler.json check ;\
rm ../gomockhandler;
# test on playground
# build gomockhandler and delete mocks with it.
# It use gomockhandler.json on /playground dir. So you may have to run make playground first.
.PHONY:playground-delete
playground-delete:
go build . ;\
cd playground ;\
../gomockhandler -config=gomockhandler.json -destination=./mock/user.go deletemock ;\
rm ../gomockhandler;
# clean up playground
.PHONY:clean
clean:
cd playground ;\
rm gomockhandler.json;\
rm -rf mock/