diff options
Diffstat (limited to 'app/backends/audiocpp/build.py')
| -rw-r--r-- | app/backends/audiocpp/build.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/app/backends/audiocpp/build.py b/app/backends/audiocpp/build.py index f840193..e3536cf 100644 --- a/app/backends/audiocpp/build.py +++ b/app/backends/audiocpp/build.py @@ -138,22 +138,26 @@ def _update_prebuilt(checkout: Path, backend: Optional[str], *, """The update route for a prebuilt (release-downloaded) install. Source builds update by rebuilding after a git pull; a prebuilt - install instead re-downloads when upstream published a newer release - (the marker's tag is compared against the latest release tag). The - recorded/detected backend selects the asset, mirroring what was - originally installed. A GitHub outage is not fatal — the installed - binary keeps working. Returns the install exit code (0 when already - current or when the check could not run). + install instead re-downloads when upstream published a newer release. + The current-version check resolves the newest tag from the release + page's redirect (no API quota); the API is only consulted by the + re-download itself, for the checksum digests. The recorded/detected + backend selects the asset, mirroring what was originally installed. + A GitHub outage is not fatal — the installed binary keeps working. + Returns the install exit code (0 when already current or when the + check could not run). """ marker = _prebuilt.installed_release(checkout, backend) - release = _prebuilt.fetch_latest_release() - if release is None: + tag = _prebuilt.resolve_latest_tag() + if tag is None: + release = _prebuilt.fetch_latest_release() + tag = str(release.get("tag_name") or "") if release else "" + if not tag: print("[WARNING] Could not check GitHub for a newer prebuilt " "audiocpp_server; keeping the installed one (" f"{marker.get('tag') if marker else 'unknown'}).") return 0 - tag = str(release.get("tag_name") or "") - if marker and tag and tag == marker.get("tag"): + if marker and tag == marker.get("tag"): print(f"[OK] Prebuilt audiocpp_server is current ({tag}).") return 0 print(f"[INFO] audio.cpp {tag} is available; downloading the prebuilt " |
