Don't attempt to fetch meta refs locally.

There isn't really any need to do a remote fetch every time a local dev
makes a tarball. This type of pre-version tagging is fairly specific to
OpenStack, and as such shouldn't bother normal people running normally.

Change-Id: I612f3483aa4c3f169e219b6c82e7d7e634e0474a
This commit is contained in:
Monty Taylor 2012-07-14 10:05:33 -07:00
parent 85f1dccce1
commit 433beb47cc
1 changed files with 7 additions and 4 deletions

View File

@ -50,10 +50,13 @@ def _get_git_next_version_suffix(branch_name):
revno_prefix = "r"
else:
revno_prefix = ""
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:
if os.environ.get('JENKINS_URL', None):
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 = ""
else:
milestonever = ""
post_version = _get_git_post_version()
# post version should look like: