Debian Codegraph @

src/ruby/pb/generate_proto_ruby.sh

raw
1 #!/bin/sh
2 # Copyright 2015 gRPC authors.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 # Regenerates gRPC service stubs from proto files.
17 set -e
18 cd $(dirname $0)/../../..
19
20 # protoc and grpc_*_plugin binaries can be obtained by running
21 # $ bazel build @com_google_protobuf//:protoc //src/compiler:all
22 PROTOC=bazel-bin/external/com_google_protobuf/protoc
23 PLUGIN=protoc-gen-grpc=bazel-bin/src/compiler/grpc_ruby_plugin
24
25 $PROTOC -I src/proto src/proto/grpc/health/v1/health.proto \
26 --grpc_out=src/ruby/pb \
27 --ruby_out=src/ruby/pb \
28 --plugin=$PLUGIN
29
30 $PROTOC -I . \
31 src/proto/grpc/testing/{messages,test,empty}.proto \
32 --grpc_out=src/ruby/pb \
33 --ruby_out=src/ruby/pb \
34 --plugin=$PLUGIN
35
36 $PROTOC -I . \
37 src/proto/grpc/core/stats.proto \
38 --grpc_out=src/ruby/qps \
39 --ruby_out=src/ruby/qps \
40 --plugin=$PLUGIN
41
42 $PROTOC -I . \
43 -I third_party/protobuf/src \
44 src/proto/grpc/testing/{messages,payloads,stats,benchmark_service,report_qps_scenario_service,worker_service,control}.proto \
45 --grpc_out=src/ruby/qps \
46 --ruby_out=src/ruby/qps \
47 --plugin=$PLUGIN
48
49 $PROTOC -I src/proto/math src/proto/math/math.proto \
50 --grpc_out=src/ruby/bin \
51 --ruby_out=src/ruby/bin \
52 --plugin=$PLUGIN