-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (46 loc) · 1.02 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
GOPATH:=$(shell go env GOPATH)
.PHONY: init
init:
make submodule
make proto
make config
make gitlab
.PHONY: submodule
submodule:
git submodule init
git submodule update
.PHONY: proto
proto:
mkdir -p api/pb
protoc -I pb/proto -I pb/lib \
--go_out api/pb \
--go_temporal_opt paths=source_relative \
--go_opt paths=source_relative \
--go-grpc_out api/pb \
--go-grpc_opt paths=source_relative \
--go_temporal_out api/pb \
--go_temporal_opt paths=source_relative pb/proto/base/temporal_service.proto
.PHONY: build
build:
go build -o base *.go
.PHONY: test
test:
go test -v ./... -cover -race
.PHONY: vendor
vendor:
go get ./...
go mod vendor
go mod verify
.PHONY: config
config:
cp -rf ./config.example.yaml ./config.yaml
cp -rf ./config.example.yaml ./config.test.yaml
.PHONY: gitlab
gitlab:
-cp -rf ./-gitlab-ci.yml ./.gitlab-ci.yml
-rm -rf ./-gitlab-ci.yml
# ==============================================================================
# Swagger
swagger:
@echo Starting swagger generating
swag init -g **/**/*.go