[llvm] [llvm][release] Reveal download links based on uploaded assets (PR #167688)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 20 06:09:16 PST 2025


================
@@ -115,28 +194,48 @@ def upload_files(repo, release, files):
         print("Done")
 
 
-def uncomment_download_links(repo, release):
-    release = repo.get_release("llvmorg-{}".format(release))
+def uncomment_download_links(repo, release_version):
+    release = repo.get_release("llvmorg-{}".format(release_version))
+
+    # At this point any automatic builds have finished and if
+    # they succeeded, uploaded files to the release assets.
+    release_assets = set([a.name for a in release.assets])
+    print("Found release assets: ", release_assets)
 
     new_message = []
-    to_remove = [
-        "AUTOMATIC_DOWNLOAD_LINKS_BEGIN",
-        "AUTOMATIC_DOWNLOAD_LINKS_END",
-        "AUTOMATIC_DOWNLOAD_LINKS_PLACEHOLDER",
-    ]
+    modified = False
     for line in release.body.splitlines():
-        for comment in to_remove:
-            if comment in line:
-                break
-        else:
-            new_message.append(line)
-
-    release.update_release(
-        name=release.title,
-        message="\n".join(new_message),
-        draft=release.draft,
-        prerelease=release.prerelease,
-    )
+        # All hidden download links are of the form:
+        # <!-- <some unique tag> <markdown content> -->
+        if line.startswith("<!--"):
----------------
DavidSpickett wrote:

Done.

https://github.com/llvm/llvm-project/pull/167688


More information about the llvm-commits mailing list