Commit 6dc2ab71 authored by Filippos Giannakos's avatar Filippos Giannakos
Browse files

Strip rc from version when ending a release

parent 680fed02
......@@ -7,7 +7,7 @@ logging.basicConfig()
from argparse import ArgumentParser
os.environ["GIT_PYTHON_TRACE"] = "full"
from devflow import utils, versioning
from devflow import utils, versioning, RC_RE
from devflow.version import __version__
from devflow.autopkg import call
from devflow.ui import query_action, query_user, query_yes_no
......@@ -307,6 +307,12 @@ class GitManager(object):
edit_action = partial(self.edit_changelog, upstream_branch, "develop")
self.check_edit_changelog(edit_action, args, default=True)
vcs = utils.get_vcs_info()
release_version = versioning.get_base_version(vcs)
if re.match('.*'+RC_RE, release_version):
new_version = re.sub(RC_RE, '', release_version)
versioning._bump_version(new_version, vcs)
#merge to master
self._merge_branches(master, upstream_branch)
self._merge_branches(debian_master, debian_branch)
......
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