Skip to content

fix: publish Homebrew cask on first release#490

Merged
hanneshapke merged 3 commits into
mainfrom
fix/homebrew-tap-first-publish
May 30, 2026
Merged

fix: publish Homebrew cask on first release#490
hanneshapke merged 3 commits into
mainfrom
fix/homebrew-tap-first-publish

Conversation

@hanneshapke
Copy link
Copy Markdown
Collaborator

@hanneshapke hanneshapke commented May 30, 2026

Problem

brew install --cask dataiku/tap/kiji-privacy-proxy fails — the tap repo dataiku/homebrew-tap contains only its README.md, no Casks/. The cask has never been published, despite every release running the publish-homebrew-tap job 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:

if git diff --quiet -- Casks/kiji-privacy-proxy.rb; then
  echo "::notice::Cask already at ${VERSION}, nothing to commit."
  exit 0
fi

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 early exit 0, and the git add/commit/push never 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:

##[notice]Cask already at 1.1.2, nothing to commit.

Fix

Stage the file first, then check the staged diff against HEAD:

git add Casks/kiji-privacy-proxy.rb
if git diff --cached --quiet; then
  echo "::notice::Cask already at ${VERSION}, nothing to commit."
  exit 0
fi
git commit ...
git push ...

git diff --cached --quiet detects 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, sha256 bd6a9da0b68befaac6332adfe6f8229058cc5ce66b86b353120e374bb5e5efdc) to dataiku/homebrew-tap.

🤖 Generated with Claude Code


Docs (added in this PR)

Documented brew install --cask dataiku/tap/kiji-privacy-proxy as the recommended macOS install path in:

  • README.md (Quick Start)
  • docs/01-getting-started.md (Quick Installation)
  • the generated GitHub Release notes (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).

hanneshapke and others added 3 commits May 29, 2026 18:47
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>
@hanneshapke hanneshapke merged commit 9cf7247 into main May 30, 2026
7 checks passed
@hanneshapke hanneshapke deleted the fix/homebrew-tap-first-publish branch May 30, 2026 01:52
@github-actions github-actions Bot locked and limited conversation to collaborators May 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant