From ba4425ab5227fd9597fccd368bffff6bf1032149 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Sat, 10 Sep 2011 11:25:53 +0200 Subject: Imported Upstream version 2.1.0 --- bin/update-release-info.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'bin/update-release-info.py') diff --git a/bin/update-release-info.py b/bin/update-release-info.py index 7e11c4b..1c84466 100644 --- a/bin/update-release-info.py +++ b/bin/update-release-info.py @@ -36,7 +36,7 @@ In 'post' mode, files are prepared for the next release cycle: src/Announce.txt. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -57,7 +57,7 @@ In 'post' mode, files are prepared for the next release cycle: # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "bin/update-release-info.py 5134 2010/08/16 23:02:40 bdeegan" +__revision__ = "bin/update-release-info.py 5357 2011/09/09 21:31:03 bdeegan" import os import sys @@ -114,12 +114,18 @@ if version_tuple[3] != 'final': else: yyyy,mm,dd,_,_,_ = release_date version_tuple = version_tuple[:4] + ((yyyy*100 + mm)*100 + dd,) - version_string = '.'.join(map(str, version_tuple)) + +import pdb +pdb.set_trace() + +if mode == 'final' or mode == 'release': + version_string = '.'.join(map(str, version_tuple[0:3])) else: - # Final release doesn't have type or builddate in version string - version_string = '.'.join(map(str, version_tuple[:3])) + version_string = '.'.join(map(str, version_tuple)) version_type = version_tuple[3] + + if DEBUG: print 'version string', version_string if version_type not in ['alpha', 'beta', 'candidate', 'final']: @@ -188,7 +194,9 @@ class UpdateFile(object): ''' XXX ''' + if DEBUG: print "content before:%s"%self.content self.content = self.match_rel.sub(replacement, self.content, count) + if DEBUG: print "content after :%s"%self.content # Determine the release date and the pattern to match a date # Mon, 05 Jun 2010 21:17:15 -0700 -- cgit v1.2.3