Skip to content
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
20 changes: 9 additions & 11 deletions run_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import os
import re
import shelve
import shlex
import shutil
import subprocess
import sys
Expand Down Expand Up @@ -312,6 +313,7 @@ def check_tool(db: ReleaseShelf, tool: str) -> None:
raise ReleaseException(f"{tool} is not available")


check_gh = functools.partial(check_tool, tool="gh")
check_git = functools.partial(check_tool, tool="git")
check_make = functools.partial(check_tool, tool="make")
check_blurb = functools.partial(check_tool, tool="blurb")
Expand Down Expand Up @@ -927,21 +929,16 @@ def start_build_release(db: ReleaseShelf) -> None:
# After visually confirming the release manager can start the build process
# with the known good commit SHA.
print()
print(
"Go to https://github.com/python/release-tools/actions/workflows/build-release.yml"
)
print("Select 'Run workflow' and enter the following values:")
print(f"- Git remote to checkout: {origin_remote_github_owner}")
print(f"- Git commit to target for the release: {commit_sha}")
print(f"- CPython release number: {db['release']}")
print()
print("Or using the GitHub CLI run:")
print(
" gh workflow run build-release.yml --repo python/release-tools"
cmd = (
"gh workflow run build-release.yml --repo python/release-tools"
f" -f git_remote={origin_remote_github_owner}"
f" -f git_commit={commit_sha}"
f" -f cpython_release={db['release']}"
)
subprocess.check_call(shlex.split(cmd))
print(
"Go to https://github.com/python/release-tools/actions/workflows/build-release.yml"
)
print()

if not ask_question("Have you started the build-release workflow?"):
Expand Down Expand Up @@ -1390,6 +1387,7 @@ def _api_key(api_key: str) -> str:
release_tag = release_mod.Tag(args.release)
no_gpg = release_tag.as_tuple() >= (3, 14) # see PEP 761
tasks = [
Task(check_gh, "Checking gh is available"),
Task(check_git, "Checking Git is available"),
Task(check_make, "Checking make is available"),
Task(check_blurb, "Checking blurb is available"),
Expand Down