Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
c9af9a55
Commit
c9af9a55
authored
Sep 12, 2019
by
Rafi Kamal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix update_version.py, so that PROTOBUF_VERSION is always a 9 digit number.
parent
ae1bcaad
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
39 additions
and
39 deletions
+39
-39
any.pb.h
src/google/protobuf/any.pb.h
+2
-2
api.pb.h
src/google/protobuf/api.pb.h
+2
-2
plugin.pb.h
src/google/protobuf/compiler/plugin.pb.h
+2
-2
descriptor.pb.h
src/google/protobuf/descriptor.pb.h
+2
-2
duration.pb.h
src/google/protobuf/duration.pb.h
+2
-2
empty.pb.h
src/google/protobuf/empty.pb.h
+2
-2
field_mask.pb.h
src/google/protobuf/field_mask.pb.h
+2
-2
port_def.inc
src/google/protobuf/port_def.inc
+4
-4
source_context.pb.h
src/google/protobuf/source_context.pb.h
+2
-2
struct.pb.h
src/google/protobuf/struct.pb.h
+2
-2
common.h
src/google/protobuf/stubs/common.h
+4
-4
timestamp.pb.h
src/google/protobuf/timestamp.pb.h
+2
-2
type.pb.h
src/google/protobuf/type.pb.h
+2
-2
wrappers.pb.h
src/google/protobuf/wrappers.pb.h
+2
-2
update_version.py
update_version.py
+7
-7
No files found.
src/google/protobuf/any.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/api.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/compiler/plugin.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/descriptor.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/duration.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/empty.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/field_mask.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/port_def.inc
View file @
c9af9a55
...
...
@@ -288,14 +288,14 @@
// Shared google3/opensource definitions. //////////////////////////////////////
#define PROTOBUF_VERSION 30
0
10000
#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 30
0
10000
#define PROTOBUF_MIN_PROTOC_VERSION 30
0
10000
#define PROTOBUF_VERSION 3010000
#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC 3010000
#define PROTOBUF_MIN_PROTOC_VERSION 3010000
#define PROTOBUF_VERSION_SUFFIX ""
// The minimum library version which works with the current version of the
// headers.
#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 30
0
10000
#define GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION 3010000
#if defined(GOOGLE_PROTOBUF_NO_RTTI) && GOOGLE_PROTOBUF_NO_RTTI
#define PROTOBUF_RTTI 0
...
...
src/google/protobuf/source_context.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/struct.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/stubs/common.h
View file @
c9af9a55
...
...
@@ -81,7 +81,7 @@ namespace internal {
// The current version, represented as a single integer to make comparison
// easier: major * 10^6 + minor * 10^3 + micro
#define GOOGLE_PROTOBUF_VERSION 30
0
10000
#define GOOGLE_PROTOBUF_VERSION 3010000
// A suffix string for alpha, beta or rc releases. Empty for stable releases.
#define GOOGLE_PROTOBUF_VERSION_SUFFIX ""
...
...
@@ -89,15 +89,15 @@ namespace internal {
// The minimum header version which works with the current version of
// the library. This constant should only be used by protoc's C++ code
// generator.
static
const
int
kMinHeaderVersionForLibrary
=
30
0
10000
;
static
const
int
kMinHeaderVersionForLibrary
=
3010000
;
// The minimum protoc version which works with the current version of the
// headers.
#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 30
0
10000
#define GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 3010000
// The minimum header version which works with the current version of
// protoc. This constant should only be used in VerifyVersion().
static
const
int
kMinHeaderVersionForProtoc
=
30
0
10000
;
static
const
int
kMinHeaderVersionForProtoc
=
3010000
;
// Verifies that the headers and libraries are compatible. Use the macro
// below to call this.
...
...
src/google/protobuf/timestamp.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/type.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
src/google/protobuf/wrappers.pb.h
View file @
c9af9a55
...
...
@@ -8,12 +8,12 @@
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 30
0
10000
#if PROTOBUF_VERSION < 3010000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 30
0
10000 < PROTOBUF_MIN_PROTOC_VERSION
#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
...
...
update_version.py
View file @
c9af9a55
...
...
@@ -24,7 +24,7 @@ Example:
exit
(
1
)
NEW_VERSION
=
sys
.
argv
[
1
]
NEW_VERSION_INFO
=
NEW_VERSION
.
split
(
'.'
)
NEW_VERSION_INFO
=
[
int
(
x
)
for
x
in
NEW_VERSION
.
split
(
'.'
)]
if
len
(
NEW_VERSION_INFO
)
!=
3
:
print
"""
[ERROR] Version must be in the format <MAJOR>.<MINOR>.<MICRO>
...
...
@@ -99,7 +99,7 @@ def UpdateConfigure():
def
UpdateCpp
():
cpp_version
=
'
%
s00
%
s00
%
s
'
%
(
cpp_version
=
'
%
d
%03
d
%03
d
'
%
(
NEW_VERSION_INFO
[
0
],
NEW_VERSION_INFO
[
1
],
NEW_VERSION_INFO
[
2
])
def
RewriteCommon
(
line
):
line
=
re
.
sub
(
...
...
@@ -110,7 +110,7 @@ def UpdateCpp():
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
(
r'^#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC .*$'
,
'#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC
%
s'
%
cpp_version
,
...
...
@@ -134,7 +134,7 @@ def UpdateCpp():
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
(
r'^#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC .*$'
,
'#define PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC
%
s'
%
cpp_version
,
...
...
@@ -228,7 +228,7 @@ def UpdateJavaScript():
def
UpdateMakefile
():
protobuf_version_offset
=
11
expected_major_version
=
'3'
expected_major_version
=
3
if
NEW_VERSION_INFO
[
0
]
!=
expected_major_version
:
print
"""[ERROR] Major protobuf version has changed. Please update
update_version.py to readjust the protobuf_version_offset and
...
...
@@ -237,8 +237,8 @@ always increasing.
"""
exit
(
1
)
protobuf_version_info
=
'
%
s:
%
s
:0'
%
(
int
(
NEW_VERSION_INFO
[
1
])
+
protobuf_version_offset
,
NEW_VERSION_INFO
[
2
])
protobuf_version_info
=
'
%
d:
%
d
:0'
%
(
NEW_VERSION_INFO
[
1
]
+
protobuf_version_offset
,
NEW_VERSION_INFO
[
2
])
RewriteTextFile
(
'src/Makefile.am'
,
lambda
line
:
re
.
sub
(
r'^PROTOBUF_VERSION = .*$'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment