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:
parent
ee7568ca8d
commit
c711c0049e
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user