forked from jsmouret/grpc-over-webrtc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproto1.sh
executable file
·40 lines (34 loc) · 1000 Bytes
/
proto1.sh
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
# clean
rm -rf ./server/protos
mkdir -p ./server/protos
rm -rf ./client_flutter/lib/protos
mkdir -p ./client_flutter/lib/protos
# gen protos
GO_OUT_PATH=server/protos
DART_OUT_PATH=client_flutter/lib/protos
protoc -I protos \
--go_out=$GO_OUT_PATH \
--go_opt=paths=source_relative \
--go-grpc_out=$GO_OUT_PATH \
--go-grpc_opt=paths=source_relative \
--dart_out=grpc:$DART_OUT_PATH \
protos/signaling/signaling.proto
protoc -I protos \
--go_out=$GO_OUT_PATH \
--go_opt=paths=source_relative \
--go-grpc_out=$GO_OUT_PATH \
--go-grpc_opt=paths=source_relative \
--dart_out=grpc:$DART_OUT_PATH \
protos/grtc/grtc.proto
protoc -I protos \
--go_out=$GO_OUT_PATH \
--go_opt=paths=source_relative \
--go-grpc_out=$GO_OUT_PATH \
--go-grpc_opt=paths=source_relative \
--dart_out=grpc:$DART_OUT_PATH \
protos/echo/echo.proto
# stat
echo -- Server --
ls -al ./server/protos
echo -- Client-Flutter --
ls -al ./client_flutter/lib/protos