Skip to content

Commit 6c0d770

Browse files
committed
Prompt to update the docs by version page
1 parent 4a6cf47 commit 6c0d770

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

run_release.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import argparse
1010
import asyncio
1111
import contextlib
12+
import datetime as dt
1213
import functools
1314
import getpass
1415
import json
@@ -1031,6 +1032,21 @@ def modify_the_release_to_the_prerelease_pages(db: ReleaseShelf) -> None:
10311032
)
10321033

10331034

1035+
def modify_the_docs_by_version_page(db: ReleaseShelf) -> None:
1036+
if db["release"].is_final:
1037+
version = db["release"]
1038+
date = dt.datetime.now().strftime("%d %B %Y")
1039+
if not ask_question(
1040+
"Have you already added the docs to https://www.python.org/doc/versions/ ?\n"
1041+
"For example:\n"
1042+
f"* `Python {version} <https://docs.python.org/release/{version}/>`_, "
1043+
f"documentation released on {date}."
1044+
):
1045+
raise ReleaseException(
1046+
"The release has not been added to the docs by version page"
1047+
)
1048+
1049+
10341050
def post_release_merge(db: ReleaseShelf) -> None:
10351051
subprocess.check_call(
10361052
["git", "fetch", "--all"],
@@ -1330,6 +1346,7 @@ def _api_key(api_key: str) -> str:
13301346
Task(run_add_to_python_dot_org, "Add files to python.org download page"),
13311347
Task(purge_the_cdn, "Purge the CDN of python.org/downloads"),
13321348
Task(modify_the_release_to_the_prerelease_pages, "Modify the pre-release page"),
1349+
Task(modify_the_docs_by_version_page, "Update docs by version page"),
13331350
]
13341351
automata = ReleaseDriver(
13351352
git_repo=args.repo,

0 commit comments

Comments
 (0)