aboutsummaryrefslogtreecommitdiff
path: root/csharp/generate_protos.sh
diff options
context:
space:
mode:
authorJie Luo <jieluo@google.com>2017-12-19 11:54:11 -0800
committerJie Luo <jieluo@google.com>2017-12-19 15:38:02 -0800
commitb308580bb1c3f87a062ac1448a3e0bdaab9d40cf (patch)
treeea211f27b3deb05a9ba5461079288020a11b5c8d /csharp/generate_protos.sh
parent3a06fe1fc9590b534f403114a0668befba926947 (diff)
downloadprotobuf-b308580bb1c3f87a062ac1448a3e0bdaab9d40cf.tar.gz
protobuf-b308580bb1c3f87a062ac1448a3e0bdaab9d40cf.tar.bz2
protobuf-b308580bb1c3f87a062ac1448a3e0bdaab9d40cf.zip
Cherrypick for csharp, including:
Add preserve UnknownFields Compare floating point values bitwise Add auto-generated header to C# generated files
Diffstat (limited to 'csharp/generate_protos.sh')
-rwxr-xr-xcsharp/generate_protos.sh30
1 files changed, 11 insertions, 19 deletions
diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh
index d2f47479..5c748e35 100755
--- a/csharp/generate_protos.sh
+++ b/csharp/generate_protos.sh
@@ -3,7 +3,7 @@
# You first need to make sure protoc has been built (see instructions on
# building protoc in root of this repository)
-set -ex
+set -e
# cd to repository root
pushd $(dirname $0)/..
@@ -40,28 +40,20 @@ $PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf \
src/google/protobuf/type.proto \
src/google/protobuf/wrappers.proto
-# Test protos where the namespace matches the target location
-$PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf.Test \
- --csharp_opt=base_namespace=Google.Protobuf \
- src/google/protobuf/map_unittest_proto3.proto \
- src/google/protobuf/unittest_proto3.proto \
- src/google/protobuf/unittest_import_proto3.proto \
- src/google/protobuf/unittest_import_public_proto3.proto \
- src/google/protobuf/unittest_well_known_types.proto
-
-# Different base namespace to the protos above
-$PROTOC -Isrc -Icsharp/protos --csharp_out=csharp/src/Google.Protobuf.Test \
- --csharp_opt=base_namespace=UnitTest.Issues \
+# Test protos
+$PROTOC -Isrc -Icsharp/protos \
+ --csharp_out=csharp/src/Google.Protobuf.Test/TestProtos \
+ csharp/protos/map_unittest_proto3.proto \
csharp/protos/unittest_issues.proto \
- csharp/protos/unittest_custom_options_proto3.proto
-
-# Don't specify a base namespace at all; we just want to make sure the
-# results end up in TestProtos.
-$PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf.Test/TestProtos \
+ csharp/protos/unittest_custom_options_proto3.proto \
+ csharp/protos/unittest_proto3.proto \
+ csharp/protos/unittest_import_proto3.proto \
+ csharp/protos/unittest_import_public_proto3.proto \
+ src/google/protobuf/unittest_well_known_types.proto \
src/google/protobuf/test_messages_proto3.proto
# AddressBook sample protos
-$PROTOC -Iexamples --csharp_out=csharp/src/AddressBook \
+$PROTOC -Iexamples -Isrc --csharp_out=csharp/src/AddressBook \
examples/addressbook.proto
$PROTOC -Iconformance -Isrc --csharp_out=csharp/src/Google.Protobuf.Conformance \