Commit 6beba487 authored by Jason R. Coombs's avatar Jason R. Coombs

Updated bump message to use the bumped version, not the old version.

--HG--
branch : distribute
extra : rebase_source : 9baf8490fa439e610c2cdb2b3e5db28920bdea1c
parent a119995b
......@@ -19,6 +19,8 @@ def get_next_version():
digits[-1] += 1
return '.'.join(map(str, digits))
NEXT_VERSION = get_next_version()
def bump_versions():
files_with_versions = ('docs/conf.py', 'setup.py', 'release.py',
'release.sh', 'README.txt', 'distribute_setup.py')
......@@ -26,7 +28,7 @@ def bump_versions():
def bump_version(filename):
with open(filename, 'rb') as f:
lines = [line.replace(VERSION, get_next_version()) for line in f]
lines = [line.replace(VERSION, NEXT_VERSION) for line in f]
with open(filename, 'wb') as f:
f.writelines(lines)
......@@ -53,7 +55,8 @@ def do_release():
# we just tagged the current version, bump for the next release.
bump_versions()
subprocess.check_call(['hg', 'ci', '-m',
'Bumped to {VERSION} in preparation for next release.'.format(**globals())])
'Bumped to {NEXT_VERSION} in preparation for next '
'release.'.format(**globals())])
# push the changes
subprocess.check_call(['hg', 'push'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment