File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 99import argparse
1010import asyncio
1111import contextlib
12+ import datetime as dt
1213import functools
1314import getpass
1415import 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+
10341050def 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 ,
You can’t perform that action at this time.
0 commit comments