py/makeversionhdr: Add --tags arg to git describe.
This adds the --tags argument to the git describe command that is used to define the MICROPY_GIT_TAG macro. This makes it match non-annotated tags. This is useful for MicroPython derivatives that don't use annotated tags. Signed-off-by: David Lechner <david@pybricks.com>
This commit is contained in:
parent
3966f67746
commit
d934f8c8a8
@ -23,7 +23,7 @@ def get_version_info_from_git():
|
|||||||
# Note: git describe doesn't work if no tag is available
|
# Note: git describe doesn't work if no tag is available
|
||||||
try:
|
try:
|
||||||
git_tag = subprocess.check_output(
|
git_tag = subprocess.check_output(
|
||||||
["git", "describe", "--dirty", "--always", "--match", "v[1-9].*"],
|
["git", "describe", "--tags", "--dirty", "--always", "--match", "v[1-9].*"],
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
universal_newlines=True,
|
universal_newlines=True,
|
||||||
).strip()
|
).strip()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user