2.7 KiB
2.7 KiB
| name | description | args |
|---|---|---|
| shipit | Run the full BlockNinja plugin/theme pre-publish pipeline — clean-tree check, make, archive-check, check-safety, version bump, tag, push, ninja plugin publish, registry verification — halting at the first failure with evidence. Use when publishing a plugin or theme version, or when asked to "ship" or "release" a plugin. | [patch|minor|major] (default: patch) |
Ship It — Plugin Publish Pipeline
Executes the mandatory pre-publish checklist from plugins/CLAUDE.md as a single halting pipeline. Run from (or pointed at) a plugin/theme repo under ~/src/blockninja/plugins/ or ~/src/blockninja/themes/.
Pipeline (halt at first failure; report each step verified-with-evidence)
- Clean tree:
git status --porcelainmust be empty (untracked files won't ship —ninja plugin publishshipsgit archive HEAD). If dirty: stop and show what's uncommitted; never auto-stage. - Branch check:
git branch --show-current— must bemain. - Build:
make— the.somust compile (CGO). Stale*_templ.gois the usual failure: runmake templ, commit, retry once. - Archive check:
make archive-checkmust exit 0 (proves a cleangit archive HEADcompiles — exactly what publish ships). If the Makefile lacks the target, flag it instead of skipping. - Safety:
cd ~/src/blockninja/check-safety && go run . <plugin-path>must exit 0. Fix violations; never baseline, skip, or defer. - Generated-files policy spot-check: confirm committed
web/dist(if the plugin has one) is fresh — rebuilt this session or newer than the newestweb/srcfile. A stale tracked dist gets silently embedded. - Bump:
ninja plugin bump <patch|minor|major>(from args; default patch). This edits plugin.mod and commits but does NOT tag. - Tag + push:
git tag vX.Y.Zmatching the new plugin.mod version, thengit push origin main vX.Y.Z(push the tag explicitly —--follow-tagsskips lightweight tags). - Publish:
ninja plugin publish(add--channel <c>or--privateif the user said so). - Verify:
ninja plugin versionmust show the new version in the registry. This is the runtime evidence — without it the publish is unverified.
Report format
One line per step: ✓ <step> — <evidence (exact command + key output line)> or ✗ <step> — <failure + root cause + what to fix>. Stop at ✗; everything after is "not run".
Notes
- Theme repos:
kind = "theme"in plugin.mod (DB CHECK constraint rejects "plugin"). - Version source of truth is plugin.mod; tag must match exactly.
- First-ever publish of a new plugin needs
ninja plugin init+ registry review flow — seeplugins/CLAUDE.md; this skill covers subsequent versions.