-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (32 loc) · 1.55 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
.PHONY: pb pb2 up down clean v swag
pb:
@echo $(GOPATH)
protoc --proto_path=./protos/ ./protos/*.proto --go_out=./common-service/pb --go_opt=paths=source_relative
protoc --proto_path=./protos/ ./protos/*.proto --go-grpc_out=./common-service/pb --go-grpc_opt=paths=source_relative --plugin=$(GOPATH)/bin/protoc-gen-go-grpc
protoc --proto_path=./protos/ ./protos/*.proto --go_out=./restapi/pb --go_opt=paths=source_relative
protoc --proto_path=./protos/ ./protos/*.proto --go-grpc_out=./restapi/pb --go-grpc_opt=paths=source_relative --plugin=$(GOPATH)/bin/protoc-gen-go-grpc
pb2:
protoc --proto_path=./protos/ ./protos/*.proto --go_out=./common-service/pb --go_opt=paths=source_relative
protoc --proto_path=./protos/ ./protos/*.proto --go-grpc_out=./common-service/pb --go-grpc_opt=paths=source_relative --plugin=C:\Users\Dumrul\go\bin\protoc-gen-go-grpc
protoc --proto_path=./protos/ ./protos/*.proto --go_out=./restapi/pb --go_opt=paths=source_relative
protoc --proto_path=./protos/ ./protos/*.proto --go-grpc_out=./restapi/pb --go-grpc_opt=paths=source_relative --plugin=C:\Users\Dumrul\go\bin\protoc-gen-go-grpc
up:
@echo "up"
sudo docker-compose up --build
down:
@echo "down"
sudo docker-compose down
sudo docker image rm maydere/common-service --force
sudo docker image rm maydere/restapi --force
clean:
go clean -modcache
v:
protoc --version
protoc-gen-go --version
swag:
cd restapi && $(GOPATH)/bin/swag init -g main.go
upgr:
cd common-service && go get -u all
cd common-service && go mod tidy
cd restapi && go get -u all
cd restapi && go mod tidy