소스 검색

Merge pull request #1239 from jskeet/call_generate_protos

Generate C# code whenever descriptor.proto changes
Jon Skeet 9 년 전
부모
커밋
abc09f795e
2개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      csharp/generate_protos.sh
  2. 5 0
      generate_descriptor_proto.sh

+ 1 - 1
csharp/generate_protos.sh

@@ -6,7 +6,7 @@
 set -ex
 set -ex
 
 
 # cd to repository root
 # cd to repository root
-cd $(dirname $0)/..
+pushd $(dirname $0)/..
 
 
 # Protocol buffer compiler to use. If the PROTOC variable is set,
 # Protocol buffer compiler to use. If the PROTOC variable is set,
 # use that. Otherwise, probe for expected locations under both
 # use that. Otherwise, probe for expected locations under both

+ 5 - 0
generate_descriptor_proto.sh

@@ -96,3 +96,8 @@ if test -x objectivec/generate_descriptors_proto.sh; then
   echo "Generating messages for objc."
   echo "Generating messages for objc."
   objectivec/generate_descriptors_proto.sh $@
   objectivec/generate_descriptors_proto.sh $@
 fi
 fi
+
+if test -x csharp/generate_protos.sh; then
+  echo "Generating messages for C#."
+  csharp/generate_protos.sh $@
+fi