Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release_checklist.py checks if 'begin dev cycle' PR is needed #6934

Merged
merged 3 commits into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion script/release_checklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ def main():
print(f" ✅ Release notes look good.")
else:
previous_minor_version = version_minor - 1
previous_stable_branch = f"releases/v{version_major}.{previous_minor_version}.0"
previous_release = f"v{version_major}.{previous_minor_version}.0"
print(f" ❌ Release notes not published. Please run `script/release_notes.py --since {previous_release}` on branch `{branch_name}`.")
else:
Expand Down Expand Up @@ -248,5 +247,34 @@ def main():
else:
print(f" ❌ Bump branch {bump_branch} does not exist")

# Check lean4 master branch for next development cycle
print("\nChecking lean4 master branch configuration...")
next_version = get_next_version(toolchain)
next_minor = int(next_version.split('.')[1])

cmake_content = get_branch_content(lean_repo_url, "master", "src/CMakeLists.txt", github_token)
if cmake_content is None:
print(" ❌ Could not retrieve CMakeLists.txt from master")
else:
cmake_lines = cmake_content.splitlines()
# 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(")"))
version_minor_correct = actual_minor >= next_minor
break
else:
version_minor_correct = False

is_release_correct = any(
l.strip().startswith("set(LEAN_VERSION_IS_RELEASE 0)")
for l in cmake_lines
)

if not (version_minor_correct and is_release_correct):
print(" ❌ lean4 needs a \"begin dev cycle\" PR")
else:
print(" ✅ lean4 master branch is configured for next development cycle")

if __name__ == "__main__":
main()
Loading