-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
21 lines (19 loc) · 901 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
generate_grpc_code:
rm -rf gen && mkdir gen
export PATH="$${PATH}:$$(go env GOPATH)/bin";\
protoc --proto_path=proto proto/*.proto --go_out=gen/ --go-grpc_out=gen/ -I . \
--grpc-gateway_out ./gen \
--grpc-gateway_opt logtostderr=true \
--grpc-gateway_opt generate_unbound_methods=true
generate_grpc_code_windows:
if exist gen rmdir \s \q gen
mkdir gen
set PATH=%PATH%;%GOPATH%\bin && ^
protoc --proto_path=proto proto\*.proto --go_out=gen\ --go-grpc_out=gen\ -I ^
--grpc-gateway_out .\gen ^
--grpc-gateway_opt logtostderr=true ^
--grpc-gateway_opt generate_unbound_methods=true
download_protos:
mkdir -p proto/google/api
curl https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/annotations.proto > proto/google/api/annotations.proto
curl https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/http.proto > proto/google/api/http.proto