Only use version tags when determining built gerrit version

For sites that deploy their own gerrit builds and tag their internal
releases, version numbers did not correspond to upstream version
numbers, as their internal tags were picked up by “git describe”. This
made it hard for users of those sites to relate the builds to upstream
gerrit. We now use only tags that start in "v" followed by a number
when determining the gerrit version.

Change-Id: Ib7ecaab605f06fcffd0824084923bdde9203e68b
This commit is contained in:
Christian Aistleitner 2013-07-05 14:46:29 +02:00
parent 31b89b2a39
commit 1c8a05d267

View File

@ -42,7 +42,7 @@ java_library(
# TODO(sop): Move git describe into an uncacheable genrule()
def git_describe():
import subprocess
cmd = ['git', 'describe', 'HEAD']
cmd = ['git', 'describe', '--match', 'v[0-9].*', 'HEAD']
p = subprocess.Popen(cmd, stdout = subprocess.PIPE)
v = p.communicate()[0].strip()
r = p.returncode