Fix version determination for 10.x

The old glob assumed one digit before the ".". Now pick anything
that doesn't start with "v" and is on the main branch. These are
always merge commits. Code merged in is on the second parent.
This commit is contained in:
Scott Shawcroft 2025-04-01 14:35:38 -07:00
parent 61ed7c7d53
commit 5155d247e4
No known key found for this signature in database

View file

@ -9,15 +9,17 @@ def get_version_info_from_git(repo_path, extra_args=[]):
# Note: git describe doesn't work if no tag is available
try:
git_tag = subprocess.check_output(
# CIRCUITPY-CHANGE
# CIRCUITPY-CHANGE: Ignore MicroPython tags that start with v.
# Also ignore tags that are on merged in branches.
[
"git",
"describe",
"--dirty",
"--tags",
"--always",
"--first-parent",
"--match",
"[1-9].*",
"[!v]*", # This is a glob, not a regex
*extra_args,
],
cwd=repo_path,