ad5a215359
* WIP. * Added proto3 presence support for PHP. * Added compatibility code for old generated code.
17 lines
548 B
Bash
Executable File
17 lines
548 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
cd `dirname $0`
|
|
|
|
rm -rf generated
|
|
mkdir -p generated
|
|
|
|
find proto -type f -name "*.proto"| xargs ../../src/protoc --experimental_allow_proto3_optional --php_out=generated -I../../src -I.
|
|
|
|
if [ "$1" = "--aggregate_metadata" ]; then
|
|
# Overwrite some of the files to use aggregation.
|
|
AGGREGATED_FILES="proto/test.proto proto/test_include.proto proto/test_import_descriptor_proto.proto"
|
|
../../src/protoc --experimental_allow_proto3_optional --php_out=aggregate_metadata=foo#bar:generated -I../../src -I. $AGGREGATED_FILES
|
|
fi
|