Browse Source

Update more files in update_version.py

Hao Nguyen 6 năm trước cách đây
mục cha
commit
c70643ed4b
1 tập tin đã thay đổi với 13 bổ sung0 xóa
  1. 13 0
      update_version.py

+ 13 - 0
update_version.py

@@ -86,11 +86,19 @@ def UpdateCpp():
       r'^#define GOOGLE_PROTOBUF_VERSION .*$',
       r'^#define GOOGLE_PROTOBUF_VERSION .*$',
       '#define GOOGLE_PROTOBUF_VERSION %s' % cpp_version,
       '#define GOOGLE_PROTOBUF_VERSION %s' % cpp_version,
       line)
       line)
+    line = re.sub(
+      r'^#define PROTOBUF_VERSION .*$',
+      '#define PROTOBUF_VERSION %s' % cpp_version,
+      line)
     if NEW_VERSION_INFO[2] == '0':
     if NEW_VERSION_INFO[2] == '0':
       line = re.sub(
       line = re.sub(
         r'^#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION .*$',
         r'^#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION .*$',
         '#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION %s' % cpp_version,
         '#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION %s' % cpp_version,
         line)
         line)
+      line = re.sub(
+        r'^#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC .*$',
+        '#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC %s' % cpp_version,
+        line)
       line = re.sub(
       line = re.sub(
         r'^#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION .*$',
         r'^#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION .*$',
         '#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION %s' % cpp_version,
         '#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION %s' % cpp_version,
@@ -105,6 +113,7 @@ def UpdateCpp():
         line)
         line)
     return line
     return line
   RewriteTextFile('src/google/protobuf/stubs/common.h', RewriteCpp)
   RewriteTextFile('src/google/protobuf/stubs/common.h', RewriteCpp)
+  RewriteTextFile('src/google/protobuf/port_def.inc', RewriteCpp)
 
 
 
 
 def UpdateCsharp():
 def UpdateCsharp():
@@ -125,6 +134,10 @@ def UpdateJava():
     lambda document : ReplaceText(
     lambda document : ReplaceText(
       Find(document.documentElement, 'version'), NEW_VERSION))
       Find(document.documentElement, 'version'), NEW_VERSION))
 
 
+  RewriteXml('java/bom/pom.xml',
+    lambda document : ReplaceText(
+      Find(document.documentElement, 'version'), NEW_VERSION))
+
   RewriteXml('java/core/pom.xml',
   RewriteXml('java/core/pom.xml',
     lambda document : ReplaceText(
     lambda document : ReplaceText(
       Find(Find(document.documentElement, 'parent'), 'version'),
       Find(Find(document.documentElement, 'parent'), 'version'),