summaryrefslogtreecommitdiff
path: root/bin/update-release-info.py
diff options
context:
space:
mode:
Diffstat (limited to 'bin/update-release-info.py')
-rw-r--r--bin/update-release-info.py23
1 files changed, 7 insertions, 16 deletions
diff --git a/bin/update-release-info.py b/bin/update-release-info.py
index 1c84466..cc4fa4e 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, 2011 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 5357 2011/09/09 21:31:03 bdeegan"
+__revision__ = "bin/update-release-info.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo"
import os
import sys
@@ -108,24 +108,17 @@ if DEBUG: print 'release date', release_date
if mode == 'develop' and version_tuple[3] != 'alpha':
version_tuple == version_tuple[:3] + ('alpha', 0)
-if version_tuple[3] != 'final':
+if len(version_tuple) > 3 and version_tuple[3] != 'final':
if mode == 'develop':
version_tuple = version_tuple[:4] + ('yyyymmdd',)
else:
yyyy,mm,dd,_,_,_ = release_date
version_tuple = version_tuple[:4] + ((yyyy*100 + mm)*100 + dd,)
-
-import pdb
-pdb.set_trace()
-
-if mode == 'final' or mode == 'release':
- version_string = '.'.join(map(str, version_tuple[0:3]))
+version_string = '.'.join(map(str, version_tuple))
+if len(version_tuple) > 3:
+ version_type = version_tuple[3]
else:
- version_string = '.'.join(map(str, version_tuple))
-
-version_type = version_tuple[3]
-
-
+ version_type = 'final'
if DEBUG: print 'version string', version_string
if version_type not in ['alpha', 'beta', 'candidate', 'final']:
@@ -194,9 +187,7 @@ 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