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.
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):