build system: Also get IDF version from annotated tags only

Builds on previous commit.

Note: Getting the project version still pases --tags so still works with plain
tags, to keep compatibility for existing projects
This commit is contained in:
Angus Gratton
2020-10-07 09:36:40 +11:00
parent 0f8d1cbf1b
commit 261363855c
3 changed files with 3 additions and 3 deletions

View File

@@ -196,7 +196,7 @@ def get_version():
"""
# Use git to look for a tag
try:
tag = subprocess.check_output(["git", "describe", "--tags", "--exact-match"]).strip().decode('utf-8')
tag = subprocess.check_output(["git", "describe", "--exact-match"]).strip().decode('utf-8')
is_stable = re.match(r"v[0-9\.]+$", tag) is not None
return (tag, "tag", is_stable)
except subprocess.CalledProcessError: