-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_proto.sh
executable file
·28 lines (21 loc) · 2.19 KB
/
generate_proto.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
#!/usr/bin/env bash
[ -d "flutter_app/pad_pal/packages/game_repository/lib/generated" ] && rm -r flutter_app/pad_pal/packages/game_repository/lib/generated
[ -d "flutter_app/pad_pal/packages/authentication_repository/lib/generated" ] && rm -r flutter_app/pad_pal/packages/authentication_repository/lib/generated
[ -d "flutter_app/pad_pal/packages/social_repository/lib/generated" ] && rm -r flutter_app/pad_pal/packages/social_repository/lib/generated
[ -d "flutter_app/pad_pal/packages/notification_repository/lib/generated" ] && rm -r flutter_app/pad_pal/packages/notification_repository/lib/generated
[ ! -d "flutter_app/pad_pal/packages/game_repository/lib/generated" ] && mkdir flutter_app/pad_pal/packages/game_repository/lib/generated
[ ! -d "flutter_app/pad_pal/packages/authentication_repository/lib/generated" ] && mkdir flutter_app/pad_pal/packages/authentication_repository/lib/generated
[ ! -d "flutter_app/pad_pal/packages/social_repository/lib/generated" ] && mkdir flutter_app/pad_pal/packages/social_repository/lib/generated
[ ! -d "flutter_app/pad_pal/packages/notification_repository/lib/generated" ] && mkdir flutter_app/pad_pal/packages/notification_repository/lib/generated
protoc -I ./includes/ -I ./protos/ --go_out=gateway/protos --go-grpc_out=gateway/protos \
--go_opt=paths=source_relative \
--go-grpc_opt=paths=source_relative \
auth_v1/auth_service.proto social_v1/social_service.proto descriptors/rule.proto game_v1/game_service.proto notification_v1/notification_service.proto common_v1/models.proto
protoc -I ./includes/ -I ./protos/ --dart_out=grpc:flutter_app/pad_pal/packages/authentication_repository/lib/generated \
auth_v1/auth_service.proto
protoc -I ./includes/ -I ./protos/ --dart_out=grpc:flutter_app/pad_pal/packages/social_repository/lib/generated \
social_v1/social_service.proto common_v1/models.proto
protoc -I ./includes/ -I ./protos/ --dart_out=grpc:flutter_app/pad_pal/packages/game_repository/lib/generated \
game_v1/game_service.proto common_v1/models.proto
protoc -I ./includes/ -I ./protos/ --dart_out=grpc:flutter_app/pad_pal/packages/notification_repository/lib/generated \
notification_v1/notification_service.proto common_v1/models.proto game_v1/game_service.proto