Skip to content

Add Homebrew tap support with automated formula generation - #2

Merged
mathieubrunpicard merged 1 commit into
claude/youthful-dijkstra-O96Rgfrom
claude/cli-binary-install-location-kw2id8
Sep 4, 2026
Merged

mathieubrunpicard merged 1 commit into
claude/youthful-dijkstra-O96Rgfrom
claude/cli-binary-install-location-kw2id8

Conversation

@mathieubrunpicard

Copy link
Copy Markdown
Member

Summary

This PR adds automated Homebrew formula generation and publishing to the release workflow, enabling users to install pipecorn via brew install pipecorn from the official Homebrew tap.

Key Changes

  • Tarball normalization: Added a step to the release workflow that renames oclif-generated tarballs to a consistent format (pipecorn-v<version>-<target>.tar.gz) that Homebrew can reference by version alone
  • Homebrew formula template: Updated homebrew/pipecorn.rb.tmpl to support platform-specific URLs and checksums for macOS (arm64/x64) and Linux (arm64/x64) architectures
  • Formula rendering script: Created scripts/render-homebrew-formula.sh that generates the final Homebrew formula by:
    • Substituting version placeholders
    • Computing SHA256 checksums for each platform's tarball
    • Validating all placeholders are rendered before output
  • Automated tap publishing: Added a new homebrew job to the release workflow that:
    • Downloads release tarballs
    • Renders the formula with correct checksums
    • Pushes the formula to the pipecorn/homebrew-tap repository
  • Documentation: Updated README.md to reflect the new Homebrew installation method

Implementation Details

  • The formula rendering script validates that all required tarballs exist before proceeding
  • Platform detection uses Homebrew's on_macos/on_linux and on_arm/on_intel DSL for architecture-specific installation
  • The tap publishing uses a dedicated HOMEBREW_TAP_TOKEN secret for authentication
  • The workflow ensures tarballs are published before attempting to render and push the formula via the needs: tarballs dependency

https://claude.ai/code/session_01VJDs7niXGGW2dmPXd1e93S

Nothing rendered homebrew/pipecorn.rb.tmpl or pushed it anywhere, so the
documented brew install had no tap behind it. Render the formula from the
release tarballs and push it to pipecorn/homebrew-tap, which lets users
install with a bare `brew install pipecorn` after tapping once.

oclif stamps a commit sha into packed tarball names, so normalise them to
pipecorn-v<version>-<target>.tar.gz first: the formula has to build its
download URL from the version alone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJDs7niXGGW2dmPXd1e93S
@mathieubrunpicard
mathieubrunpicard merged commit c44659c into claude/youthful-dijkstra-O96Rg Sep 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants