diff options
| author | bwarsaw | 1999-01-15 04:22:16 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-01-15 04:22:16 +0000 |
| commit | afdc7fa4d45d65a1d6192405cae3826d80db4f72 (patch) | |
| tree | 720565f5154391d8123a9ce1eb047d3076f56ce2 /admin/bin/Release.py | |
| parent | 6db5b8e16dd193fbed573cb344da0a84b1bbe19f (diff) | |
| download | mailman-afdc7fa4d45d65a1d6192405cae3826d80db4f72.tar.gz mailman-afdc7fa4d45d65a1d6192405cae3826d80db4f72.tar.zst mailman-afdc7fa4d45d65a1d6192405cae3826d80db4f72.zip | |
Diffstat (limited to 'admin/bin/Release.py')
| -rwxr-xr-x | admin/bin/Release.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/admin/bin/Release.py b/admin/bin/Release.py index 1ffa9a106..19974e515 100755 --- a/admin/bin/Release.py +++ b/admin/bin/Release.py @@ -36,6 +36,7 @@ Where: import sys import os import string +import re import time import tempfile import getopt @@ -117,23 +118,26 @@ def do_bump(newvers): fp.write(text) fp.close() # hack the configure.in file - print 'configure.in...', - fp_in = open('configure.in') - fp_out = open('configure.in.new', 'w') + print 'Defaults.py.in...', + fp_in = open('Mailman/Defaults.py.in') + fp_out = open('Mailman/Defaults.py.in.new', 'w') matched = 0 + cre = re.compile(r'^VERSION(?P<ws>[ \t]*)=') while 1: line = fp_in.readline() if not line: + if not matched: + print 'Error! VERSION line not found' break - if not matched and line[:8] == 'VERSION=': - fp_out.write('VERSION=' + newvers + '\n') - matched = 1 - else: + mo = cre.search(line) + if matched or not mo: fp_out.write(line) + else: + fp_out.write('VERSION%s= "%s"\n' % (mo.group('ws'), newvers)) + matched = 1 fp_in.close() fp_out.close() - os.rename('configure.in.new', 'configure.in') - os.system('autoreconf') + os.rename('Mailman/Defaults.py.in.new', 'Mailman/Defaults.py.in') # update the TODO file print 'TODO...' os.system('admin/bin/mm2do') |
