feat(phase-4): packaging — releases, npm, homebrew tap#13
Merged
Conversation
Phase 4 sub-specs gating the GH Releases + Homebrew tap implementation. releases.md covers semver, version source of truth (new lib/version.sh), tag policy, release-notes template, the .github/workflows/release.yml workflow, install URL strategy, and the pre-flight checklist for v1.0.0. homebrew.md covers the sonpiaz/homebrew-tap repo, Formula/watch-cli.rb (with the ROOT_DIR-rewrite install block that makes the bin/lib split work under brew's prefix layout), auto-bump-on-release wiring, first-formula bootstrap, and the test plan. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
- lib/version.sh as single source of truth for WATCH_CLI_VERSION (0.3.0) - bin/watch and lib/env.sh now source lib/version.sh - .github/workflows/release.yml on tag v*: tarball release + npm publish + homebrew tap PR - install.sh fetches from latest GitHub Release tarball, falls back to git clone - README install section adds brew tap option - sonpiaz/homebrew-tap repo created with bootstrap watch-cli.rb formula Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
Closes Phase 4 of the watch-cli foundation: tagged releases, an npm-published MCP server, and a Homebrew tap. Together these turn the v1 output schema promise into a concrete artifact contract —
v1means "the tarball at tag v1.x.y" — and replace the current "everyone installs frommainHEAD" footgun.Items shipped
lib/version.sh— single VERSION source of truthlib/version.sh(new)bin/watchline 41 +lib/env.sh). One source kills the drift risk. CI guardrail check lives indocs/releases.md§"CI guardrail".lib/version.shbin/{watch,dl-video,extract-frames,transcribe,audio-q,models}--versionflag now prints$WATCH_CLI_VERSION_STRING.bin/dl-videoandbin/extract-framesgained the standard symlink-resolve preamble so they can source the lib.lib/env.shsourceslib/version.shlib/env.shWATCH_CLI_VERSION="0.2.0"removed. User-Agent header now derives from the single constant.lib/version.sh,mcp-server/package.jsonmcp-serverversion stays in lockstep with watch-cli — both bumped to 0.3.0..github/workflows/release.ymlpush: tags: ['v*']. Three jobs:release(verify-tag-on-main, verify-version, build tarball, generate notes,gh release create),publish-mcp(npm version sync + build + publish),bump-tap(open PR againstsonpiaz/homebrew-tapwith new version + sha256).install.shfetches release tarballinstall.shreleases/latest/download/watch-cli.tar.gz.WATCH_CLI_VERSIONenv → pins. Falls back togit cloneif no release exists (bootstrap window). SHA256-verifies against the publishedwatch-cli.tar.gz.sha256.README.mddocs/releases.mddocuments secretsdocs/releases.mdsonpiaz/homebrew-tapbootstrappedFormula/watch-cli.rb+ README entry. Commit: sonpiaz/homebrew-tap@2e638fa. SHA256 is placeholder until v0.3.0 ships.User action items (BLOCKS first release)
Before tagging
v0.3.0, Son must do these three things manually — the workflow can't generate secrets on its own:NPM_TOKEN(Automation type) at https://www.npmjs.com/settings/sonpiaz/tokens, paste into watch-cli repo Settings → Secrets and variables → Actions. Without this, thepublish-mcpjob fails; GH Release + tarball + tap PR still succeed.HOMEBREW_TAP_PAT(fine-grained, scoped tosonpiaz/homebrew-taponly, perms: contents:write + pull-requests:write + metadata:read, 1-year expiry) at https://github.com/settings/personal-access-tokens. Paste into the same secrets page. Without this, thebump-tapjob fails; GH Release + tarball + npm publish still succeed.Formula/watch-cli.rbin the tap PR to use the real sha256 from the release asset (auto-bump fills it; reviewer only needs to verify + merge).Test plan
bash -non all 6 bin scripts +install.sh— passwatch-cli v0.3.0on--versionbash tests/test-output-schema.sh— all assertions passrelease.ymlparses as valid YAML (python3 -m yaml)Formula/watch-cli.rbcommitted + pushed tosonpiaz/homebrew-tapv0.3.0; workflow creates GH Release + tarballcurl -fsSL releases/latest/download/install.sh | bashon a clean container succeedsWATCH_CLI_VERSION=0.3.0 curl …pins correctlybrew install sonpiaz/tap/watch-clion a clean Mac works end-to-end@sonpiaz/[email protected]resolvable on npmReviewer checklist
grep -r "0\.2\.0" .returns nothing meaningful)release.ymlverify-versionstep would catch a tag/lib driftinstall.shgit-clone fallback is preserved for the bootstrap windowbin/watch --helpandbin/dl-video --helpline ranges still capture the right comment block after the preamble insertiondocs/releases.md"Required repo secrets" section spells out the manual setupFormula/watch-cli.rbdescline is exactly the 71-char locked variant from BRANDING.md (no hype words)