From d934f8c8a8bb896595a6b976126222b438f383ea Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 5 Jul 2021 10:37:34 -0500 Subject: [PATCH] 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 --- py/makeversionhdr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/makeversionhdr.py b/py/makeversionhdr.py index 2f4bc91826..54b7fa9ab7 100644 --- a/py/makeversionhdr.py +++ b/py/makeversionhdr.py @@ -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", "--match", "v[1-9].*"], + ["git", "describe", "--tags", "--dirty", "--always", "--match", "v[1-9].*"], stderr=subprocess.STDOUT, universal_newlines=True, ).strip()