diff options
| author | Monty Taylor <mordred@inaugust.com> | 2012-10-26 11:07:26 -0400 |
|---|---|---|
| committer | Monty Taylor <mordred@inaugust.com> | 2012-10-26 11:07:26 -0400 |
| commit | b87960426a9d791e992211c73677f58d78e56bb9 (patch) | |
| tree | ecad9c1984ccfe61315213ff0ac479765839fe75 /openstack/common/setup.py | |
| parent | d887090b5a31672e4a12f302b3818e2b0933bef0 (diff) | |
| download | oslo-b87960426a9d791e992211c73677f58d78e56bb9.tar.gz oslo-b87960426a9d791e992211c73677f58d78e56bb9.tar.xz oslo-b87960426a9d791e992211c73677f58d78e56bb9.zip | |
Fix a logic error in stable version calculation.
Milestone information in blank for stable branches, so there is no milestone
prefix. However, we were blindly concatenating the milestone version
prefix onto the datestamp.
Fixes bug 1059634.
Change-Id: I6cff4ee7f6c1dc970397b66fd2d15fa22b0a63a3
Diffstat (limited to 'openstack/common/setup.py')
| -rw-r--r-- | openstack/common/setup.py | 8 |
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)) |
