generate_protos.sh 548 B

12345678910111213141516
  1. #!/bin/bash
  2. set -ex
  3. cd `dirname $0`
  4. rm -rf generated
  5. mkdir -p generated
  6. find proto -type f -name "*.proto"| xargs ../../src/protoc --experimental_allow_proto3_optional --php_out=generated -I../../src -I.
  7. if [ "$1" = "--aggregate_metadata" ]; then
  8. # Overwrite some of the files to use aggregation.
  9. AGGREGATED_FILES="proto/test.proto proto/test_include.proto proto/test_import_descriptor_proto.proto"
  10. ../../src/protoc --experimental_allow_proto3_optional --php_out=aggregate_metadata=foo#bar:generated -I../../src -I. $AGGREGATED_FILES
  11. fi