diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-09-23 14:31:31 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-09-23 14:31:31 -0700 |
commit | 97a1c1e08d87ca8c669418a6c46d605d3d602497 (patch) | |
tree | b5962a51747fe0d0f617dc68dc1e0696dfe5024a /csharp/generate_protos.sh | |
parent | c9418912cb5483551fecde5463c56a0ae40830fb (diff) | |
parent | 9489817df2cbe096170007a1e6deea45745a2c55 (diff) |
Merge pull request #785 from jskeet/csharp-directories
Generate C# directory hierarchy with new option
Diffstat (limited to 'csharp/generate_protos.sh')
-rwxr-xr-x | csharp/generate_protos.sh | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh index 0d217a9d..3a556b0e 100755 --- a/csharp/generate_protos.sh +++ b/csharp/generate_protos.sh @@ -35,11 +35,10 @@ if [ -z "$PROTOC" ]; then fi fi -# Descriptor proto -$PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf/Reflection \ - src/google/protobuf/descriptor.proto - -$PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf/WellKnownTypes \ +# descriptor.proto and well-known types +$PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf \ + --csharp_opt=base_namespace=Google.Protobuf \ + src/google/protobuf/descriptor.proto \ src/google/protobuf/any.proto \ src/google/protobuf/api.proto \ src/google/protobuf/duration.proto \ @@ -51,15 +50,18 @@ $PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf/WellKnownTypes \ src/google/protobuf/type.proto \ src/google/protobuf/wrappers.proto -$PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf.Test/TestProtos \ +# 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 - -$PROTOC -Icsharp/protos --csharp_out=csharp/src/Google.Protobuf.Test/TestProtos \ +# Different base namespace to the protos above +$PROTOC -Icsharp/protos --csharp_out=csharp/src/Google.Protobuf.Test \ + --csharp_opt=base_namespace=UnitTest.Issues \ csharp/protos/unittest_issues.proto # AddressBook sample protos |