diff options
author | Neil Williams <neil.williams@linaro.org> | 2018-04-19 10:57:24 +0100 |
---|---|---|
committer | Neil Williams <neil.williams@linaro.org> | 2018-04-23 16:05:54 +0000 |
commit | fe70ac6ca6a2a02ea62d982eb0eb86d30166bb3e (patch) | |
tree | e627288f17ab7de2a498f9dfa316c489946e93e9 | |
parent | 1f7c5b5f15fc9070433f7db59d91028b14d82036 (diff) |
Update version.py for repos with no tags
Change-Id: Ieffb2fdf74ed8e49f4f6b589b1525df3c47f7260
(cherry picked from commit 3acd0c608860da68fe3d9349a32225d2e2e5fda5)
-rwxr-xr-x | version.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/version.py b/version.py index f0c904f29..522cef5d6 100755 --- a/version.py +++ b/version.py @@ -49,7 +49,7 @@ def version_tag(): clone_hash = commits[0].replace('commit ', '')[:8] tag_data = subprocess.check_output(tag_list).strip().decode('utf-8') tags = tag_data.split('\n') - if len(tags) < 2: + if not set([tag for tag in tags if 'refs/tags/' in tag]): return clone_hash tag_line = str(tags[len(tags) - 1]).replace('\'', '').strip() tag_name = tag_line.split("/")[2] |