fix: publish Homebrew cask on first release#490
Merged
Conversation
The publish-homebrew-tap step renders the cask to a new file, then runs `git diff --quiet -- Casks/kiji-privacy-proxy.rb` to decide whether to commit. That check only inspects tracked files, so on the very first publish (empty tap) it sees no change to a known file, reports "nothing to commit", and exits 0 without ever adding/committing/pushing — leaving dataiku/homebrew-tap with only its README. Every release since the homebrew job was added has silently no-op'd. Stage the file first, then check `git diff --cached --quiet`, which detects brand-new files as well as modifications. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Document `brew install --cask dataiku/tap/kiji-privacy-proxy` as the recommended macOS install path in the README quick start, the getting-started guide, and the generated GitHub Release notes, alongside the existing manual DMG download. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
brew install --cask dataiku/tap/kiji-privacy-proxyfails — the tap repodataiku/homebrew-tapcontains only itsREADME.md, noCasks/. The cask has never been published, despite every release running thepublish-homebrew-tapjob to success.Root cause is in the "Render cask and push" step. It renders the cask to a brand-new file and then gates the commit on:
git diff --quiet -- <path>only inspects tracked files. On the first publish the cask is untracked, so git reports no change, the step takes the earlyexit 0, and thegit add/commit/pushnever run. It's chicken-and-egg: it will only commit a file that's already committed.Confirmed in the v1.1.2 run — the cask rendered with
version "1.1.2", then:Fix
Stage the file first, then check the staged diff against
HEAD:git diff --cached --quietdetects brand-new files as well as modifications, so the first publish commits the cask and subsequent runs stay idempotent.After this lands
The next release will populate the tap automatically. To unblock the already-released v1.1.2 immediately without waiting, the tap can be seeded once by committing the rendered cask (version
1.1.2, sha256bd6a9da0b68befaac6332adfe6f8229058cc5ce66b86b353120e374bb5e5efdc) todataiku/homebrew-tap.🤖 Generated with Claude Code
Docs (added in this PR)
Documented
brew install --cask dataiku/tap/kiji-privacy-proxyas the recommended macOS install path in:README.md(Quick Start)docs/01-getting-started.md(Quick Installation)release.yml)These instructions become functional once the tap is populated (after this fix ships on the next release, or via a one-time manual seed).