homebrew-bottles: change pages artifacts branch to main

Closes: tuna/issues#2236
This commit is contained in:
Miao Wang 2025-06-22 19:24:21 +08:00
parent 4764ee0d68
commit 309d183689

View File

@ -38,9 +38,11 @@ def formulae_github_pages(zip_file: Path, unzip_directory: Path, tar_directory:
artifacts = artifacts.json() artifacts = artifacts.json()
latest = None latest = None
for artifact in artifacts["artifacts"]: for artifact in artifacts["artifacts"]:
if artifact["workflow_run"]["head_branch"] == "master": if artifact["workflow_run"]["head_branch"] == "main":
latest = artifact latest = artifact
break break
if latest is None:
raise Exception("No latest artifact found")
zip_url = latest["archive_download_url"] zip_url = latest["archive_download_url"]
check_and_download(zip_url, zip_file, zip_file, github_api_headers) check_and_download(zip_url, zip_file, zip_file, github_api_headers)