Skip to content

Prototype: build script — zip addons, generate addons.xml entries and md5s per channel #15

Closed

Description

@JMAN730

Part of #12

Question

What does the build script look like that turns this repo's sources into a channel-organised release bundle?

Prototype a script (Python, stdlib-only preferred) that:

  • Discovers every addon dir with an addon.xml, reads id/version, zips each as <id>-<version>.zip with the correct internal layout.
  • Organises output per channel according to the channel manifest.
  • Emits per-channel addons.xml entries (or full files) + .md5, plus the assets the datadir needs.
  • Is runnable locally (python tools/build_repo.py) so the maintainer and CI share one code path.

Blocked by the artifact-format research and the channel manifest decision.

Deliverable: working prototype on a branch, linked from this issue.

Activity

  1. self-assigned this
    on Jul 6, 2026
  2. JMAN730 commented on Jul 6, 2026

    @JMAN730
    OwnerAuthor

    Resolved. Working prototype: tools/build_repo.py + channels.json on branch JMAN730/setup-matt-pocock-skills (commit 86b6717). Run with python3 tools/build_repo.py — stdlib only, one code path for local and CI.

    Verified against the real sources:

    • Builds all 8 shipped addons into out/<channel>/…; correctly skips the two []-mapped services; enforces both manifest rules (unmapped dir / dangling entry → hard fail).
    • Every zip contains exactly one root folder named the addon id (checked across all 9 produced zips) — Kodi's install requirement.
    • addons.xml per channel wraps each addon.xml verbatim and re-parses cleanly; .md5 is the bare hash of the exact bytes (verified with md5sum).
    • <assets> files are copied into datadir/<id>/ with subpaths preserved (e.g. redlight's resources/media/addon_icons/icon.png).

    Finding (pre-existing source bug): plugin.audio.mp3streams declares <icon>icon.png</icon> / <fanart>fanart.jpg</fanart> but the icon actually lives at art/icon.png and no fanart file exists — its icon is broken on the live server today too. Fix belongs in that addon's addon.xml (<icon>art/icon.png</icon>, drop the fanart entry), left for the maintainer or a follow-up PR; the script surfaces it as a WARN.

    Handed to the release-wiring ticket: the out/ tree is exactly the shape the maintainer must land on the server, so the bundle question in "Define the maintainer handoff" reduces to how to wrap this tree.

  3. JMAN730 commented on Jul 6, 2026

    @JMAN730
    OwnerAuthor

    Closing — prototype built and verified, see resolution above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions