fix: parse LEAN_VERSION_MINOR correctly in release_checklist.py (#12785)
This PR fixes a parsing bug in \`release_checklist.py\` introduced by https://github.com/leanprover/lean4/pull/12700, which reformatted \`src/CMakeLists.txt\` to use \`CACHE STRING \"\"\`: \`\`\`cmake set(LEAN_VERSION_MINOR 30 CACHE STRING "") \`\`\` The old code used \`split()[-1].rstrip(")")\` to extract the version number, which now yields \`""\` (the empty string argument) instead of the minor version. Use a regex to extract the digit directly. 🤖 Prepared with Claude Code Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0fb289c470
commit
1c60b40261
1 changed files with 2 additions and 1 deletions
|
|
@ -966,7 +966,8 @@ def main():
|
|||
# Find the actual minor version in CMakeLists.txt
|
||||
for line in cmake_lines:
|
||||
if line.strip().startswith("set(LEAN_VERSION_MINOR "):
|
||||
actual_minor = int(line.split()[-1].rstrip(")"))
|
||||
m = re.search(r'set\(LEAN_VERSION_MINOR\s+(\d+)', line)
|
||||
actual_minor = int(m.group(1)) if m else 0
|
||||
version_minor_correct = actual_minor >= next_minor
|
||||
break
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue