Skip to content

Commit

Permalink
No need to update version in generated code (#6471)
Browse files Browse the repository at this point in the history
generate_descriptor will handle that
  • Loading branch information
TeBoring committed Aug 2, 2019
1 parent bc5f088 commit ebfde4c
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions update_version.py
Expand Up @@ -147,31 +147,9 @@ def RewritePortDef(line):
'#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION %s' % cpp_version,
line)
return line
def RewritePbH(line):
line = re.sub(
r'^#if PROTOBUF_VERSION < .*$',
'#if PROTOBUF_VERSION < %s' % cpp_version,
line)
line = re.sub(
r'^#if .* < PROTOBUF_MIN_PROTOC_VERSION$',
'#if %s < PROTOBUF_MIN_PROTOC_VERSION' % cpp_version,
line)
return line


RewriteTextFile('src/google/protobuf/stubs/common.h', RewriteCommon)
RewriteTextFile('src/google/protobuf/port_def.inc', RewritePortDef)
RewriteTextFile('src/google/protobuf/any.pb.h', RewritePbH)
RewriteTextFile('src/google/protobuf/api.pb.h', RewritePbH)
RewriteTextFile('src/google/protobuf/descriptor.pb.h', RewritePbH)
RewriteTextFile('src/google/protobuf/duration.pb.h', RewritePbH)
RewriteTextFile('src/google/protobuf/empty.pb.h', RewritePbH)
RewriteTextFile('src/google/protobuf/field_mask.pb.h', RewritePbH)
RewriteTextFile('src/google/protobuf/source_context.pb.h', RewritePbH)
RewriteTextFile('src/google/protobuf/struct.pb.h', RewritePbH)
RewriteTextFile('src/google/protobuf/timestamp.pb.h', RewritePbH)
RewriteTextFile('src/google/protobuf/type.pb.h', RewritePbH)
RewriteTextFile('src/google/protobuf/wrappers.pb.h', RewritePbH)
RewriteTextFile('src/google/protobuf/compiler/plugin.pb.h', RewritePbH)


def UpdateCsharp():
Expand Down

0 comments on commit ebfde4c

Please sign in to comment.