fix: use dl_url not github_url for bakery binary downloads
All checks were successful
Mirror to GitHub / mirror (push) Successful in 3s

github_url points to GitHub releases that aren't always published for
dev/patch versions (bread v0.6.4 exists on dl.breadway.dev but not on
GitHub). dl.breadway.dev is publicly accessible and is the canonical
source — use dl_url from the bakery index instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHr5CeufsAfTrt41XoApir
This commit is contained in:
Breadway 2026-06-18 21:03:33 +08:00
parent e1b82c62f7
commit ee27310610

View file

@ -61,8 +61,9 @@ jobs:
curl -fsSL "https://dl.breadway.dev/index.json" \ curl -fsSL "https://dl.breadway.dev/index.json" \
-o /build-home/.cache/bakery/index.json -o /build-home/.cache/bakery/index.json
# Download each binary from its pinned GitHub release URL and # Download each binary from dl.breadway.dev (canonical source; github_url
# generate the installed.json that bakery expects in ~/.local/state. # is not always published for dev/patch releases) and generate the
# installed.json that bakery expects in ~/.local/state.
python3 << 'PYEOF' python3 << 'PYEOF'
import json, urllib.request, os import json, urllib.request, os
@ -77,8 +78,9 @@ jobs:
for b in pkg['binaries']: for b in pkg['binaries']:
dest_name = b['name'].removesuffix('-x86_64') dest_name = b['name'].removesuffix('-x86_64')
dest = os.path.join(BIN_DIR, dest_name) dest = os.path.join(BIN_DIR, dest_name)
print(f' {dest_name} <- {b["github_url"]}', flush=True) url = b['dl_url']
urllib.request.urlretrieve(b['github_url'], dest) print(f' {dest_name} <- {url}', flush=True)
urllib.request.urlretrieve(url, dest)
os.chmod(dest, 0o755) os.chmod(dest, 0o755)
bins.append(dest_name) bins.append(dest_name)