Skip to content

Commit 71a023c

Browse files
authored
Merge pull request #10216 from tannewt/fix_version
Fix version determination for 10.x
2 parents 279d7a8 + 5155d24 commit 71a023c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

py/version.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ def get_version_info_from_git(repo_path, extra_args=[]):
99
# Note: git describe doesn't work if no tag is available
1010
try:
1111
git_tag = subprocess.check_output(
12-
# CIRCUITPY-CHANGE
12+
# CIRCUITPY-CHANGE: Ignore MicroPython tags that start with v.
13+
# Also ignore tags that are on merged in branches.
1314
[
1415
"git",
1516
"describe",
1617
"--dirty",
1718
"--tags",
1819
"--always",
20+
"--first-parent",
1921
"--match",
20-
"[1-9].*",
22+
"[!v]*", # This is a glob, not a regex
2123
*extra_args,
2224
],
2325
cwd=repo_path,

0 commit comments

Comments
 (0)