summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-10-30 21:38:30 +0000
committerGerrit Code Review <review@openstack.org>2012-10-30 21:38:30 +0000
commit4b017d73df7f7046ead3dc21a7642601438113f4 (patch)
tree587a94f649fc110784d948a744470f0a017974bf /openstack
parentaca1805d911caefe14a73edb6ced281cf54e7ad2 (diff)
parentb87960426a9d791e992211c73677f58d78e56bb9 (diff)
downloadoslo-4b017d73df7f7046ead3dc21a7642601438113f4.tar.gz
oslo-4b017d73df7f7046ead3dc21a7642601438113f4.tar.xz
oslo-4b017d73df7f7046ead3dc21a7642601438113f4.zip
Merge "Fix a logic error in stable version calculation."
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/setup.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/openstack/common/setup.py b/openstack/common/setup.py
index 4e2a577..83eef07 100644
--- a/openstack/common/setup.py
+++ b/openstack/common/setup.py
@@ -136,15 +136,17 @@ def _get_git_next_version_suffix(branch_name):
_run_shell_command("git fetch origin +refs/meta/*:refs/remotes/meta/*")
milestone_cmd = "git show meta/openstack/release:%s" % branch_name
milestonever = _run_shell_command(milestone_cmd)
- if not milestonever:
- milestonever = ""
+ if milestonever:
+ first_half = "%s~%s" % (milestonever, datestamp)
+ else:
+ first_half = datestamp
+
post_version = _get_git_post_version()
# post version should look like:
# 0.1.1.4.gcc9e28a
# where the bit after the last . is the short sha, and the bit between
# the last and second to last is the revno count
(revno, sha) = post_version.split(".")[-2:]
- first_half = "%s~%s" % (milestonever, datestamp)
second_half = "%s%s.%s" % (revno_prefix, revno, sha)
return ".".join((first_half, second_half))