From: W. Trevor King Date: Thu, 16 Feb 2012 16:57:31 +0000 (-0500) Subject: Fix release.py to allow uncommented initial _VERSION. X-Git-Tag: 1.1.0~168 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0d3d9a3780a27f1c80833638ad0622bf4e67023d;p=be.git Fix release.py to allow uncommented initial _VERSION. I was in favor of always leaving _VERSION commented in the trunk, since released branches should fork off the trunk: trunkA -> trunkB -> trunkC -> trunkD `-> 1.0.0 `-> 1.1.0 `-> 1.0.1 `-> 1.1.1 But that doesn't seem to have been how things have worked out in BE. In any case, you will need to release on top of a previous release (e.g. 1.0.1 on top of 1.0.0 in my above example), so we cannot depend on an initial comment character before _VERSION. --- diff --git a/release.py b/release.py index 0e144d8..7464871 100755 --- a/release.py +++ b/release.py @@ -66,7 +66,7 @@ def pending_changes(): def set_release_version(tag): print "set libbe.version._VERSION = '%s'" % tag - invoke(['sed', '-i', "s/^# *_VERSION *=.*/_VERSION = '%s'/" % tag, + invoke(['sed', '-i', "s/^[# ]*_VERSION *=.*/_VERSION = '%s'/" % tag, os.path.join('libbe', 'version.py')]) def remove_makefile_libbe_version_dependencies(filename):