-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathgenerateprotos.sh
executable file
·36 lines (32 loc) · 1.1 KB
/
generateprotos.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
#!/bin/bash
# Uses protoc and the gRPC plugin in tools to generate
# all the protos we use:
#
# - protoc compiler plugin
# - Generator config protos (e.g. service config, snippets)
# - GAPIC ShowCase
#
# Currently this script is hard-coded to use protoc.exe,
# so it only runs on Windows; we can use platform detection
# if that ever becomes an issue.
# Generator config protos
echo "Generating generator config protos"
tools/protoc.exe \
--csharp_out=Google.Api.Generator/ConfigProtos \
-Itools/protos \
-Igoogleapis \
-IGoogle.Api.Generator/ConfigProtos \
Google.Api.Generator/ConfigProtos/*.proto
# GAPIC Showcase
echo "Generating GAPIC Showcase"
tools/protoc.exe \
--csharp_out=Google.Api.Generator.Tests/ProtoTests/Showcase \
--csharp_opt=file_extension=.g.cs \
--plugin=protoc-gen-grpc=tools/grpc_csharp_plugin.exe \
--grpc_out=Google.Api.Generator.Tests/ProtoTests/Showcase \
--grpc_opt=file_suffix=Grpc.g.cs \
-Itools/protos \
-Igoogleapis \
-IGoogle.Api.Generator.Tests/ProtoTests/Showcase \
Google.Api.Generator.Tests/ProtoTests/Showcase/google/showcase/v1beta1/*.proto
echo "Done"