aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/generate_protos.sh
diff options
context:
space:
mode:
authorGravatar Jon Skeet <jonskeet@google.com>2017-11-10 09:50:02 +0000
committerGravatar Jon Skeet <skeet@pobox.com>2017-11-12 15:29:15 +0000
commitaa77eab622fe0ccc6cf7ec8a3fce1005dd759562 (patch)
tree20ecf0bcb607b2c3661f91b476e21478ba93d10d /csharp/generate_protos.sh
parent9a9a66e71557a5b19c96677eb26f97067c0a06d6 (diff)
Move C#-only test protos to csharp/protos
unittest_proto3 had been changed in a very backward-incompatible way which was never going to work with C# as it imports proto2 messages. This is now a copy of the old file, but with a package name change for compatibility with the remaining files in src/google/protobuf. The other moves are for files that are only used by C#.
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 \