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