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`.
pull/6470/merge
Mike Wadsten 2020-09-22 11:07:20 -05:00 zatwierdzone przez Damien George
rodzic ee7568ca8d
commit c711c0049e
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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()