diff --git a/Protobuf.podspec b/Protobuf.podspec index bfaa4600d6bd..47381bf8067d 100644 --- a/Protobuf.podspec +++ b/Protobuf.podspec @@ -5,7 +5,7 @@ # dependent projects use the :git notation to refer to the library. Pod::Spec.new do |s| s.name = 'Protobuf' - s.version = '3.7.0' + s.version = '3.7.0-rc.3' s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.' s.homepage = 'https://github.com/protocolbuffers/protobuf' s.license = '3-Clause BSD License' diff --git a/configure.ac b/configure.ac index cae769729e79..cf1dca06314f 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ AC_PREREQ(2.59) # In the SVN trunk, the version should always be the next anticipated release # version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed # the size of one file name in the dist tarfile over the 99-char limit.) -AC_INIT([Protocol Buffers],[3.7.0],[protobuf@googlegroups.com],[protobuf]) +AC_INIT([Protocol Buffers],[3.7.0-rc-3],[protobuf@googlegroups.com],[protobuf]) AM_MAINTAINER_MODE([enable]) diff --git a/csharp/Google.Protobuf.Tools.nuspec b/csharp/Google.Protobuf.Tools.nuspec index 396fdf951fec..b98cdff82bc6 100644 --- a/csharp/Google.Protobuf.Tools.nuspec +++ b/csharp/Google.Protobuf.Tools.nuspec @@ -5,7 +5,7 @@ Google Protocol Buffers tools Tools for Protocol Buffers - Google's data interchange format. See project site for more info. - 3.7.0 + 3.7.0-rc.3 Google Inc. protobuf-packages https://github.com/protocolbuffers/protobuf/blob/master/LICENSE diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.csproj b/csharp/src/Google.Protobuf/Google.Protobuf.csproj index 4b4131c37f78..224022064222 100644 --- a/csharp/src/Google.Protobuf/Google.Protobuf.csproj +++ b/csharp/src/Google.Protobuf/Google.Protobuf.csproj @@ -4,7 +4,7 @@ C# runtime library for Protocol Buffers - Google's data interchange format. Copyright 2015, Google Inc. Google Protocol Buffers - 3.7.0 + 3.7.0-rc.3 6 Google Inc. netstandard1.0;net45 diff --git a/java/bom/pom.xml b/java/bom/pom.xml index 5846d4b14e8b..f2989d750961 100644 --- a/java/bom/pom.xml +++ b/java/bom/pom.xml @@ -1,13 +1,10 @@ - + 4.0.0 com.google.protobuf protobuf-bom - 3.7.0 + 3.7.0-rc-3 pom Protocol Buffers [BOM] diff --git a/java/core/pom.xml b/java/core/pom.xml index 57226c48a3b0..51e8a0e152d4 100644 --- a/java/core/pom.xml +++ b/java/core/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.7.0 + 3.7.0-rc-3 protobuf-java diff --git a/java/pom.xml b/java/pom.xml index 54b6dc74dbc0..87f06c6ad989 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.7.0 + 3.7.0-rc-3 pom Protocol Buffers [Parent] diff --git a/java/util/pom.xml b/java/util/pom.xml index c2eab472ea87..3736cfdb42bc 100644 --- a/java/util/pom.xml +++ b/java/util/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-parent - 3.7.0 + 3.7.0-rc-3 protobuf-java-util diff --git a/js/package.json b/js/package.json index 2dc3cdb78112..1b49f24923c8 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "google-protobuf", - "version": "3.7.0", + "version": "3.7.0-rc.3", "description": "Protocol Buffers for JavaScript", "main": "google-protobuf.js", "files": [ diff --git a/php/ext/google/protobuf/package.xml b/php/ext/google/protobuf/package.xml index a33625e45988..76e02904c219 100644 --- a/php/ext/google/protobuf/package.xml +++ b/php/ext/google/protobuf/package.xml @@ -10,16 +10,16 @@ protobuf-opensource@google.com yes - 2019-02-19 - - 3.7.0 + 3.7.0RC3 3.7.0 - stable - stable + beta + beta + 2019-02-22 + 3-Clause BSD License GA release. @@ -278,15 +278,15 @@ G A release. - 3.7.0 + 3.7.0RC3 3.7.0 - stable - stable + beta + beta - 2019-02-19 - + 2019-02-22 + 3-Clause BSD License GA release. diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h index 908e3bad99cc..7903c71e96d5 100644 --- a/php/ext/google/protobuf/protobuf.h +++ b/php/ext/google/protobuf/protobuf.h @@ -37,7 +37,7 @@ #include "upb.h" #define PHP_PROTOBUF_EXTNAME "protobuf" -#define PHP_PROTOBUF_VERSION "3.7.0" +#define PHP_PROTOBUF_VERSION "3.7.0RC3" #define MAX_LENGTH_OF_INT64 20 #define SIZEOF_INT64 8 diff --git a/protoc-artifacts/pom.xml b/protoc-artifacts/pom.xml index 4ef2bf825747..797a0e114720 100644 --- a/protoc-artifacts/pom.xml +++ b/protoc-artifacts/pom.xml @@ -8,7 +8,7 @@ com.google.protobuf protoc - 3.7.0 + 3.7.0-rc-3 pom Protobuf Compiler diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py index 8cc7440c1f42..92c629a050d9 100755 --- a/python/google/protobuf/__init__.py +++ b/python/google/protobuf/__init__.py @@ -30,7 +30,7 @@ # Copyright 2007 Google Inc. All Rights Reserved. -__version__ = '3.7.0' +__version__ = '3.7.0rc3' if __name__ != '__main__': try: diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec index b646e1271c75..74c135277160 100644 --- a/ruby/google-protobuf.gemspec +++ b/ruby/google-protobuf.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = "google-protobuf" - s.version = "3.7.0" + s.version = "3.7.0.rc.3" s.licenses = ["BSD-3-Clause"] s.summary = "Protocol Buffers" s.description = "Protocol Buffers are Google's data interchange format." diff --git a/update_version.py b/update_version.py index 3985ece0860d..42e632dfbba9 100755 --- a/update_version.py +++ b/update_version.py @@ -1,16 +1,25 @@ #!/usr/bin/env python +# Usage: ./update_version.py .. [] +# +# Example: +# ./update_version.py 3.7.1 2 +# => Version will become 3.7.1-rc-2 (beta) +# ./update_version.py 3.7.1 +# => Version will become 3.7.1 (stable) import datetime import re import sys from xml.dom import minidom -if len(sys.argv) < 2: +if len(sys.argv) < 2 or len(sys.argv) > 3: print """ [ERROR] Please specify a version. +./update_version.py .. [] + Example: -./update_version.py 2.1.3 +./update_version.py 3.7.1 2 """ exit(1) @@ -21,10 +30,14 @@ [ERROR] Version must be in the format .. Example: -./update_version.py 2.1.3 +./update_version.py 3.7.3 """ exit(1) +RC_VERSION = 0 +if len(sys.argv) > 2: + RC_VERSION = int(sys.argv[2]) + def Find(elem, tagname): for child in elem.childNodes: @@ -41,6 +54,13 @@ def ReplaceText(elem, text): elem.firstChild.replaceWholeText(text) +def GetFullVersion(rc_suffix = '-rc-'): + if RC_VERSION == 0: + return NEW_VERSION + else: + return '%s%s%s' % (NEW_VERSION, rc_suffix, RC_VERSION) + + def RewriteXml(filename, rewriter, add_xml_prefix=True): document = minidom.parse(filename) rewriter(document) @@ -74,7 +94,7 @@ def UpdateConfigure(): lambda line : re.sub( r'^AC_INIT\(\[Protocol Buffers\],\[.*\],\[protobuf@googlegroups.com\],\[protobuf\]\)$', ('AC_INIT([Protocol Buffers],[%s],[protobuf@googlegroups.com],[protobuf])' - % NEW_VERSION), + % GetFullVersion()), line)) @@ -111,44 +131,44 @@ def UpdateCsharp(): RewriteXml('csharp/src/Google.Protobuf/Google.Protobuf.csproj', lambda document : ReplaceText( Find(Find(document.documentElement, 'PropertyGroup'), 'VersionPrefix'), - NEW_VERSION), + GetFullVersion(rc_suffix = '-rc.')), add_xml_prefix=False) RewriteXml('csharp/Google.Protobuf.Tools.nuspec', lambda document : ReplaceText( Find(Find(document.documentElement, 'metadata'), 'version'), - NEW_VERSION)) + GetFullVersion(rc_suffix = '-rc.'))) def UpdateJava(): RewriteXml('java/pom.xml', lambda document : ReplaceText( - Find(document.documentElement, 'version'), NEW_VERSION)) + Find(document.documentElement, 'version'), GetFullVersion())) RewriteXml('java/bom/pom.xml', lambda document : ReplaceText( - Find(document.documentElement, 'version'), NEW_VERSION)) + Find(document.documentElement, 'version'), GetFullVersion())) RewriteXml('java/core/pom.xml', lambda document : ReplaceText( Find(Find(document.documentElement, 'parent'), 'version'), - NEW_VERSION)) + GetFullVersion())) RewriteXml('java/util/pom.xml', lambda document : ReplaceText( Find(Find(document.documentElement, 'parent'), 'version'), - NEW_VERSION)) + GetFullVersion())) RewriteXml('protoc-artifacts/pom.xml', lambda document : ReplaceText( - Find(document.documentElement, 'version'), NEW_VERSION)) + Find(document.documentElement, 'version'), GetFullVersion())) def UpdateJavaScript(): RewriteTextFile('js/package.json', lambda line : re.sub( r'^ "version": ".*",$', - ' "version": "%s",' % NEW_VERSION, + ' "version": "%s",' % GetFullVersion(rc_suffix = '-rc.'), line)) @@ -176,7 +196,7 @@ def UpdateObjectiveC(): RewriteTextFile('Protobuf.podspec', lambda line : re.sub( r"^ s.version = '.*'$", - " s.version = '%s'" % NEW_VERSION, + " s.version = '%s'" % GetFullVersion(rc_suffix = '-rc.'), line)) @@ -194,8 +214,12 @@ def CreateNode(tagname, indent, children): root = document.documentElement version = Find(root, 'version') - ReplaceText(Find(version, 'release'), NEW_VERSION) + ReplaceText(Find(version, 'release'), GetFullVersion(rc_suffix = 'RC')) ReplaceText(Find(version, 'api'), NEW_VERSION) + stability = Find(root, 'stability') + ReplaceText(Find(stability, 'release'), + 'stable' if RC_VERSION == 0 else 'beta') + ReplaceText(Find(stability, 'api'), 'stable' if RC_VERSION == 0 else 'beta') now = datetime.datetime.now() ReplaceText(Find(root, 'date'), now.strftime('%Y-%m-%d')) ReplaceText(Find(root, 'time'), now.strftime('%H:%M:%S')) @@ -206,7 +230,6 @@ def CreateNode(tagname, indent, children): % NEW_VERSION) return changelog.appendChild(document.createTextNode(' ')) - stability = Find(root, 'stability') release = CreateNode('release', 2, [ CreateNode('version', 3, [ FindAndClone(version, 'release'), @@ -230,18 +253,24 @@ def CreateNode(tagname, indent, children): 'PHP_PROTOBUF_VERSION "%s"' % NEW_VERSION, line)) + RewriteTextFile('php/ext/google/protobuf/protobuf.h', + lambda line : re.sub( + r"^#define PHP_PROTOBUF_VERSION .*$", + "#define PHP_PROTOBUF_VERSION \"%s\"" % GetFullVersion(rc_suffix = 'RC'), + line)) + def UpdatePython(): RewriteTextFile('python/google/protobuf/__init__.py', lambda line : re.sub( r"^__version__ = '.*'$", - "__version__ = '%s'" % NEW_VERSION, + "__version__ = '%s'" % GetFullVersion(rc_suffix = 'rc'), line)) def UpdateRuby(): RewriteTextFile('ruby/google-protobuf.gemspec', lambda line : re.sub( r'^ s.version = ".*"$', - ' s.version = "%s"' % NEW_VERSION, + ' s.version = "%s"' % GetFullVersion(rc_suffix = '.rc.'), line))