generate_proto_ruby.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. # Regenerates gRPC service stubs from proto files.
  16. set +e
  17. cd $(dirname $0)/../../..
  18. PROTOC=bins/opt/protobuf/protoc
  19. PLUGIN=protoc-gen-grpc=bins/opt/grpc_ruby_plugin
  20. $PROTOC -I src/proto src/proto/grpc/health/v1/health.proto \
  21. --grpc_out=src/ruby/pb \
  22. --ruby_out=src/ruby/pb \
  23. --plugin=$PLUGIN
  24. $PROTOC -I . \
  25. src/proto/grpc/testing/{messages,test,empty}.proto \
  26. --grpc_out=src/ruby/pb \
  27. --ruby_out=src/ruby/pb \
  28. --plugin=$PLUGIN
  29. $PROTOC -I . \
  30. src/proto/grpc/core/stats.proto \
  31. --grpc_out=src/ruby/qps \
  32. --ruby_out=src/ruby/qps \
  33. --plugin=$PLUGIN
  34. $PROTOC -I . \
  35. src/proto/grpc/testing/{messages,payloads,stats,benchmark_service,report_qps_scenario_service,worker_service,control}.proto \
  36. --grpc_out=src/ruby/qps \
  37. --ruby_out=src/ruby/qps \
  38. --plugin=$PLUGIN
  39. $PROTOC -I src/proto/math src/proto/math/math.proto \
  40. --grpc_out=src/ruby/bin \
  41. --ruby_out=src/ruby/bin \
  42. --plugin=$PLUGIN