aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/generate_proto_csharp.sh
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-05-07 15:06:35 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-05-07 15:06:35 -0700
commiteb5a312a9b98b71bfa7438d96860c1c0f7a378da (patch)
tree9a77deaeba72f93cd065ad710b0d626e3563da30 /src/csharp/generate_proto_csharp.sh
parent085533e1dc74ba7d2b41cce52118a0aa4010d7b9 (diff)
added script to regenerate gRPC C# stubs
Diffstat (limited to 'src/csharp/generate_proto_csharp.sh')
-rwxr-xr-xsrc/csharp/generate_proto_csharp.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/csharp/generate_proto_csharp.sh b/src/csharp/generate_proto_csharp.sh
new file mode 100755
index 0000000000..bd9943b3b4
--- /dev/null
+++ b/src/csharp/generate_proto_csharp.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Copyright 2015, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Regenerates gRPC service stubs from proto files.
+set +e
+cd $(dirname $0)
+
+PLUGIN=protoc-gen-grpc=../../bins/opt/grpc_csharp_plugin
+EXAMPLES_DIR=Grpc.Examples
+INTEROP_DIR=Grpc.IntegrationTesting
+
+protoc --plugin=$PLUGIN --grpc_out=$EXAMPLES_DIR \
+ -I $EXAMPLES_DIR/proto $EXAMPLES_DIR/proto/math.proto
+
+protoc --plugin=$PLUGIN --grpc_out=$INTEROP_DIR \
+ -I $INTEROP_DIR/proto $INTEROP_DIR/proto/test.proto \ No newline at end of file