fix: parse LEAN_VERSION_MINOR correctly in release_checklist.py

The CMakeLists.txt format is `set(LEAN_VERSION_MINOR 30 CACHE STRING "")`,
so taking `split()[-1]` gives `""` not the version number. Use a regex to
extract the digit directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Kim Morrison
2026-03-04 11:28:29 +00:00
parent 95583d74bd
commit e8ebee6001

View File

@@ -1004,7 +1004,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: