diff options
author | 2016-10-12 15:04:45 -0700 | |
---|---|---|
committer | 2016-10-12 15:04:45 -0700 | |
commit | cece9c7368cab75444b3c34bb518a98d7f656759 (patch) | |
tree | 27cf83a0d9244b678d479531f9d32630e0aef727 /src/php/bin/generate_proto_php.sh | |
parent | 2cef11c6674e67aea8e7f63f7ac2869e5d44a7c5 (diff) | |
parent | d44144c3b2112ed61a21c08331bfe9e18664ceb3 (diff) |
manually fixed merge conflict. caused by the addition of a different new interop test
Diffstat (limited to 'src/php/bin/generate_proto_php.sh')
-rwxr-xr-x | src/php/bin/generate_proto_php.sh | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/src/php/bin/generate_proto_php.sh b/src/php/bin/generate_proto_php.sh index 16f93747ab..c558bc5769 100755 --- a/src/php/bin/generate_proto_php.sh +++ b/src/php/bin/generate_proto_php.sh @@ -28,13 +28,32 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - set +e -cd $(dirname $0) +cd $(dirname $0)/../../.. + +protoc --proto_path=src/proto/math \ + --php_out=src/php/tests/generated_code \ + --grpc_out=src/php/tests/generated_code \ + --plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin \ + src/proto/math/math.proto -gen_code='../tests/generated_code' -interop='../tests/interop' +# replace the Empty message with EmptyMessage +# because Empty is a PHP reserved word +sed -i 's/message Empty/message EmptyMessage/g' \ + src/proto/grpc/testing/empty.proto +sed -i 's/grpc\.testing\.Empty/grpc\.testing\.EmptyMessage/g' \ + src/proto/grpc/testing/test.proto -protoc-gen-php -i $gen_code -o $gen_code $gen_code/math.proto +protoc --proto_path=. \ + --php_out=src/php/tests/interop \ + --grpc_out=src/php/tests/interop \ + --plugin=protoc-gen-grpc=bins/opt/grpc_php_plugin \ + src/proto/grpc/testing/messages.proto \ + src/proto/grpc/testing/empty.proto \ + src/proto/grpc/testing/test.proto -protoc-gen-php -i $interop -o $interop $interop/test.proto +# change it back +sed -i 's/message EmptyMessage/message Empty/g' \ + src/proto/grpc/testing/empty.proto +sed -i 's/grpc\.testing\.EmptyMessage/grpc\.testing\.Empty/g' \ + src/proto/grpc/testing/test.proto |