From 309d18368908538f96f55a4c6f71ca48f8456924 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 22 Jun 2025 19:24:21 +0800 Subject: [PATCH] homebrew-bottles: change pages artifacts branch to main Closes: tuna/issues#2236 --- homebrew-bottles.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homebrew-bottles.py b/homebrew-bottles.py index 0fc46a7..b45286f 100755 --- a/homebrew-bottles.py +++ b/homebrew-bottles.py @@ -38,9 +38,11 @@ def formulae_github_pages(zip_file: Path, unzip_directory: Path, tar_directory: artifacts = artifacts.json() latest = None for artifact in artifacts["artifacts"]: - if artifact["workflow_run"]["head_branch"] == "master": + if artifact["workflow_run"]["head_branch"] == "main": latest = artifact break + if latest is None: + raise Exception("No latest artifact found") zip_url = latest["archive_download_url"] check_and_download(zip_url, zip_file, zip_file, github_api_headers)