diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-07-08 14:04:21 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-07-08 14:04:21 (GMT) |
commit | 1d567905c8b182dc11c951db6ce192556dafac47 (patch) | |
tree | ae8c08feb58fd42dcdad46939ead461511d88281 /maint-helper.py | |
parent | 8cc395cae98d32b243239c19d1a50a9586b53f44 (diff) |
Make maint helper add snapshot to NEWS and update NEWS.sugar
Diffstat (limited to 'maint-helper.py')
-rwxr-xr-x | maint-helper.py | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/maint-helper.py b/maint-helper.py index 45be31f..5d629ff 100755 --- a/maint-helper.py +++ b/maint-helper.py @@ -55,9 +55,51 @@ def cmd_build_snapshot(): tarball = '%s-%s-git%s.tar.bz2' % (name, version, alphatag) - os.spawnlp(os.P_WAIT, 'make', 'make', 'distcheck') + print 'Build %s...' % tarball - os.rename('%s-%s.tar.bz2' % (name, version), tarball) + #os.spawnlp(os.P_WAIT, 'make', 'make', 'distcheck') + + #os.rename('%s-%s.tar.bz2' % (name, version), tarball) + + print 'Update NEWS.sugar...' + + if os.environ.has_key('SUGAR_NEWS'): + sugar_news_path = os.environ['SUGAR_NEWS'] + if os.path.isfile(sugar_news_path): + f = open(sugar_news_path, 'r') + sugar_news = f.read() + f.close() + else: + sugar_news = '' + + [ name, version ] = get_name_and_version() + sugar_news += '%s - %s - %s\n\n' % (name, version, alphatag) + + f = open('NEWS', 'r') + for line in f.readline(): + if len(line) > 0: + sugar_news += line + else: + break + f.close() + + f = open(sugar_news_path, 'w') + f.write(sugar_news) + f.close() + + print 'Update NEWS...' + + f = open('NEWS', 'r') + news = f.read() + f.close() + + news = 'Snapshot %s\n\n' % alphatag + news + + f = open('NEWS', 'w') + f.write(news) + f.close() + + print 'Done.' def check_licenses(path, license, missing): matchers = { 'LGPL' : 'GNU Lesser General Public', |