generate_registry: support absolute .deb Filename (Releases-hosted)#15
Merged
Conversation
CardputerZero/packages now serves .deb from a GitHub Release, so the Packages index Filename is an absolute URL instead of an in-repo path. Use such URLs verbatim for download.url; fall back to the legacy raw-content path otherwise. Without this the registry produced .../raw/main/https://github.com/... links. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CardputerZero/packagesnow serves.debfrom a GitHub Release (LFS budget exhausted). The PagesPackagesindexFilenamebecomes an absolute URL (e.g.https://github.com/CardputerZero/packages/releases/download/apt-pool/<asset>.deb) instead of an in-repo path. The current generator hardcodesdownload.url = https://github.com/CardputerZero/packages/raw/main/{filename}, which would produce a broken.../raw/main/https://github.com/...link.Depends on CardputerZero/packages#51 and m5stack/CardputerZero-AppBuilder#4.
Change
scripts/generate_registry.py: ifFilenameis already an absolutehttp(s)URL, use it verbatim fordownload.url; otherwise fall back to the legacy raw-content path. Icon/screenshot asset resolution is unchanged.Test
Ran the generator locally against a synthetic
Packageswith absolute releaseFilename+ realmeta.json:download.urlnow points at the release asset;download.size/sha256preserved; assets still resolve via raw github.Test plan
Sync Registry from Packages(workflow_dispatch) and confirmgenerated/registry.jsondownload URLs point at the release.Made with Cursor