Skip to content

Commit

Permalink
Also purge source metadata files
Browse files Browse the repository at this point in the history
  • Loading branch information
sethmlarson authored Aug 12, 2024
1 parent a5ff970 commit cb570fd
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions run_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,15 +937,28 @@ def purge_the_cdn(db: ReleaseShelf) -> None:
f"https://www.python.org/downloads/release/python-{str(db['release']).replace('.', '')}/",
f"https://docs.python.org/release/{db['release']}/",
f"https://www.python.org/ftp/python/{normalized_release}/",
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tgz",
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tgz.asc",
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tar.xz",
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tar.xz.asc",
f"https://docs.python.org/release/{normalized_release}/",
"https://www.python.org/downloads/",
"https://www.python.org/downloads/windows/",
"https://www.python.org/downloads/macos/",
]
# Purge the source URLs and their associated metadata files.
source_urls = [
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tgz",
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tar.xz",
]
for source_url in source_urls:
urls.extend(
[
f"{source_url}",
f"{source_url}.asc",
f"{source_url}.crt",
f"{source_url}.sig",
f"{source_url}.sigstore",
f"{source_url}.spdx.json",
]
)

for url in urls:
req = urllib.request.Request(url=url, headers=headers, method="PURGE")
# try:
Expand Down

0 comments on commit cb570fd

Please sign in to comment.