Paul Yang | 6b27c1f | 2017-03-17 11:08:06 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
Brian Wignall | a104dff | 2020-01-08 13:18:20 -0500 | [diff] [blame] | 3 | # Run this script to regenerate descriptor protos after the protocol compiler |
Paul Yang | 6b27c1f | 2017-03-17 11:08:06 -0700 | [diff] [blame] | 4 | # changes. |
| 5 | |
Joshua Haberman | ec4b194 | 2020-10-05 22:27:56 -0700 | [diff] [blame] | 6 | set -e |
| 7 | |
Paul Yang | 6b27c1f | 2017-03-17 11:08:06 -0700 | [diff] [blame] | 8 | if test ! -e src/google/protobuf/stubs/common.h; then |
| 9 | cat >&2 << __EOF__ |
| 10 | Could not find source code. Make sure you are running this script from the |
| 11 | root of the distribution tree. |
| 12 | __EOF__ |
| 13 | exit 1 |
| 14 | fi |
| 15 | |
| 16 | pushd src |
| 17 | ./protoc --php_out=internal:../php/src google/protobuf/descriptor.proto |
Joshua Haberman | ec4b194 | 2020-10-05 22:27:56 -0700 | [diff] [blame] | 18 | ./protoc --php_out=internal_generate_c_wkt:../php/src \ |
Joshua Haberman | cfc0c2b | 2020-10-05 22:24:34 -0700 | [diff] [blame] | 19 | google/protobuf/any.proto \ |
| 20 | google/protobuf/api.proto \ |
| 21 | google/protobuf/duration.proto \ |
| 22 | google/protobuf/empty.proto \ |
| 23 | google/protobuf/field_mask.proto \ |
| 24 | google/protobuf/source_context.proto \ |
| 25 | google/protobuf/struct.proto \ |
| 26 | google/protobuf/type.proto \ |
| 27 | google/protobuf/timestamp.proto \ |
| 28 | google/protobuf/wrappers.proto |
Paul Yang | 6b27c1f | 2017-03-17 11:08:06 -0700 | [diff] [blame] | 29 | popd |