py/makeversionhdr.py: Match only git tags which look like versions.

Some downstream projects may use tags in their repositories for more than
just designating MicroPython releases.  In those cases, the
makeversionhdr.py script would end up using a different tag than intended.
So tell `git describe` to only match tags that look like a MicroPython
version tag, such as `v1.12` or `v2.0`.
This commit is contained in:
Mike Wadsten 2020-09-22 11:07:20 -05:00 committed by Damien George
parent ee7568ca8d
commit c711c0049e
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ def get_version_info_from_git():
# Note: git describe doesn't work if no tag is available
try:
git_tag = subprocess.check_output(
["git", "describe", "--dirty", "--always"],
["git", "describe", "--dirty", "--always", "--match", "v[1-9].*"],
stderr=subprocess.STDOUT,
universal_newlines=True,
).strip()