diff options
author | Mike Wadsten <Mike.Wadsten@digi.com> | 2020-09-22 11:07:20 -0500 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2020-10-01 11:01:43 +1000 |
commit | c711c0049e5f12cae048d2b0e77bc70e68804ea5 (patch) | |
tree | d5a45e92d92474eafb7f93c41a3efeeaf46f4c96 /py | |
parent | ee7568ca8d4f1a5d09a123cf5f7a1e430b8f4c9d (diff) | |
download | micropython-c711c0049e5f12cae048d2b0e77bc70e68804ea5.tar.gz micropython-c711c0049e5f12cae048d2b0e77bc70e68804ea5.zip |
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`.
Diffstat (limited to 'py')
-rw-r--r-- | py/makeversionhdr.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/makeversionhdr.py b/py/makeversionhdr.py index 567b3b8322..970a86e6ca 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"], + ["git", "describe", "--dirty", "--always", "--match", "v[1-9].*"], stderr=subprocess.STDOUT, universal_newlines=True, ).strip() |