Skip to content

Commit

Permalink
Fixing php proto generation script to work properly during sync (#10395)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkruskal-google authored and MaHeyndrickx committed Aug 12, 2022
1 parent 7df94e2 commit 9450259
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions php/generate_descriptor_protos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

set -e

PROTOC=protoc
PROTOC=$(realpath protoc)
if [ ! -f $PROTOC ]; then
bazel build -c opt //:protoc
PROTOC=bazel-bin/protoc
PROTOC=$(realpath bazel-bin/protoc)
fi

if test ! -e src/google/protobuf/stubs/common.h; then
Expand All @@ -19,16 +19,17 @@ __EOF__
exit 1
fi

$PROTOC --php_out=internal:php/src google/protobuf/descriptor.proto
$PROTOC --php_out=internal_generate_c_wkt:php/src \
src/google/protobuf/any.proto \
src/google/protobuf/api.proto \
src/google/protobuf/duration.proto \
src/google/protobuf/empty.proto \
src/google/protobuf/field_mask.proto \
src/google/protobuf/source_context.proto \
src/google/protobuf/struct.proto \
src/google/protobuf/type.proto \
src/google/protobuf/timestamp.proto \
src/google/protobuf/wrappers.proto
pushd src
$PROTOC --php_out=internal:../php/src google/protobuf/descriptor.proto
$PROTOC --php_out=internal_generate_c_wkt:../php/src \
google/protobuf/any.proto \
google/protobuf/api.proto \
google/protobuf/duration.proto \
google/protobuf/empty.proto \
google/protobuf/field_mask.proto \
google/protobuf/source_context.proto \
google/protobuf/struct.proto \
google/protobuf/type.proto \
google/protobuf/timestamp.proto \
google/protobuf/wrappers.proto
popd

0 comments on commit 9450259

Please sign in to comment.