Skip to content

Add Homebrew formula and release checklist - #57

Merged
leogdion merged 6 commits into
release-1.0.3from
49-homebrew
Aug 25, 2026
Merged

Add Homebrew formula and release checklist#57
leogdion merged 6 commits into
release-1.0.3from
49-homebrew

Conversation

@leogdion

@leogdion leogdion commented Aug 21, 2026

Copy link
Copy Markdown
Member

Closes #49.

Adds Homebrew packaging support: the formula source-of-truth, the manual release process, and a README install path.

The tap is not touched by this PR

The tap repo brightdigit/homebrew-tap already exists, but this PR does not create it, push to it, or modify it. Formula/git-trees.rb here is the source of truth; Homebrew never reads it from this repo. It takes effect only once it is copied into the tap, which is what brew tap brightdigit/tap clones. Until that copy happens, brew install git-trees does not work — the README says so explicitly rather than promising an install path that isn't live yet.

Once published, the user-facing install is:

brew tap brightdigit/tap
brew install git-trees

The v1.0.2 pin and its verified sha256

The formula pins https://github.com/brightdigit/git-trees/archive/refs/tags/v1.0.2.tar.gz.

The hash was computed from the real tarball, not invented. Verified two ways, and the download was confirmed genuine first (HTTP 200, valid gzip, and the expected file list) so a 404 body couldn't hash cleanly and pass silently:

$ curl -fsSL -o v1.0.2.tar.gz -w "http_code=%{http_code} size=%{size_download}\n" \
    https://github.com/brightdigit/git-trees/archive/refs/tags/v1.0.2.tar.gz
http_code=200 size=36282

$ file v1.0.2.tar.gz
v1.0.2.tar.gz: gzip compressed data, from Unix, original size modulo 2^32 122880

$ shasum -a 256 v1.0.2.tar.gz
301a8ab3f3a860c8e3125a61d45527f7a2f70a881c41d3d2ea899d47d4b547ef  v1.0.2.tar.gz

$ curl -fsSL https://github.com/brightdigit/git-trees/archive/refs/tags/v1.0.2.tar.gz | shasum -a 256
301a8ab3f3a860c8e3125a61d45527f7a2f70a881c41d3d2ea899d47d4b547ef  -

Formula design notes

  • No depends_on "git". git is a hard dependency of Homebrew itself and formulae conventionally omit it. I agree with this and did not add it.
  • No build step — it's a single bash script, so install is just bin.install "git-trees".
  • The agents template. install.sh copies AGENTS.md.template to ~/.config/git-trees/AGENTS.md, which is what TREES_AGENTS_TEMPLATE defaults to. A formula must not write into the user's home directory, so the template is staged with pkgshare.install "AGENTS.md.template" and a caveats block explains both ways to put it in place (copy it, or point TREES_AGENTS_TEMPLATE at the bundled copy). This is the one behavioral difference from install.sh, and it's inherent to packaging rather than a shortcut.
  • test do exercises the real binary: git-trees help writes usage to stderr and exits 0, so the test captures 2>&1 and asserts on usage: git trees.

Completions follow-up (#51)

completions/git-trees.bash and completions/_git-trees do not exist in this branch and are not in the v1.0.2 tarball, so a formula referencing them would break brew install today. They are deliberately not referenced. docs/RELEASING.md records the follow-up: once #51 ships in v1.0.3, the formula gains bash_completion.install / zsh_completion.install lines, added only in the revision whose url points at a tag that actually contains them.

Release checklist

New docs/RELEASING.md — a dedicated file rather than a README section, since the process spans tagging, hashing, and a second repo, and is contributor-facing rather than user-facing. There is no release automation; tags are cut by hand, so the checklist is the process. It covers: cut and push the tag, compute the new sha256 (with a note on why curl -f matters), bump url + sha256 together, copy the formula into brightdigit/homebrew-tap, and verify with brew install.

Brew tooling actually run

All of it ran locally and passed. brew audit no longer accepts a path (Calling brew audit [path ...] is disabled), so the audit and install were run through a throwaway local tap, which was removed afterward.

Check Result
ruby -c Formula/git-trees.rb Syntax OK
brew style Formula/git-trees.rb 1 file inspected, no offenses detected
brew audit --strict --formula …/git-trees exit 0, zero findings
brew install --build-from-source /opt/homebrew/Cellar/git-trees/1.0.2: 8 files, 51.4KB
brew test passed
git trees help via the installed binary prints usage, exits 0

End-to-end proof it works as a real git subcommand after install:

$ git trees help
usage: git trees <command> [args]

  init <org/repo|repo|url> [--host h] [--dir d]   create bare repo + worktree layout

The formula was uninstalled and the scratch tap deleted afterward, leaving the machine clean.

Scope

Packaging and docs only. git-trees, install.sh, and tests/smoke.sh are unmodified (git diff --stat against them is empty). The README edit is a single additive block inserted after the curl path, leaving the surrounding prose untouched so the concurrent ## Install edits in #54 and #51 merge cleanly.

🤖 Generated with Claude Code


Release coordination (v1.0.3)

One of five PRs into release-1.0.3 (#56 prune, #58 sync, #60 completions, #59 curl install, #57 Homebrew). All five are green on CI (smoke on Linux + macOS).

Suggested merge order: #56#58#60#59#57. This PR merges cleanly against every other branch.

Ships inert by design. The formula here is the source of truth; brew install only works once it is copied into brightdigit/homebrew-tap. docs/RELEASING.md covers that step.

Follow-up for v1.0.3: the formula pins the v1.0.2 tarball and deliberately omits the completions from #60 — those files are not in that tarball, so referencing them would break brew install today. Once v1.0.3 is tagged, bump url/sha256 and add the bash_completion.install / zsh_completion.install lines per the checklist.

Note: CodeRabbit skipped all five — "reviews are disabled for this base branch." These have not had automated review; that would come when release-1.0.3 merges to main.

The CHANGELOG is deliberately excluded from every PR — it needs the merged PR URLs, so it lands as one commit on release-1.0.3 before tagging v1.0.3.

Add `Formula/git-trees.rb` as the source of truth for the Homebrew
formula, pinned to the v1.0.2 release tarball with a verified sha256.
The formula installs the script as `git-trees` on PATH and stages
`AGENTS.md.template` in `pkgshare`, since `TREES_AGENTS_TEMPLATE`
defaults to `~/.config/git-trees/AGENTS.md` and a formula must not write
into the user's home directory — a `caveats` block explains how to put
it in place.

Add `docs/RELEASING.md` covering the manual release process: cut and
push the tag, hash the new tarball, bump `url` + `sha256`, copy the
formula into `brightdigit/homebrew-tap`, and verify with `brew install`.
It also records the shell-completions follow-up for v1.0.3 (#51).

Add a Homebrew section to the README's `## Install`, noting the formula
is not yet published to the tap.

This does not push to the tap repo; the formula must be copied there to
take effect.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 649d1e13-aecb-46e2-9120-05cf1cb4f2c3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

leogdion and others added 5 commits August 25, 2026 14:33
Move the formula under homebrew-tap/ and add a release workflow that updates
url/sha256 and git-subrepo pushes to brightdigit/homebrew-tap.

Co-authored-by: Cursor <cursoragent@cursor.com>
….git --branch=main homebrew-tap

subrepo:
  subdir:   "homebrew-tap"
  merged:   "7043a61"
upstream:
  origin:   "https://github.com/brightdigit/homebrew-tap.git"
  branch:   "main"
  commit:   "none"
git-subrepo:
  version:  "0.4.9"
  origin:   "https://github.com/Homebrew/brew"
  commit:   "b48c7994b5"
subrepo:
  subdir:   "homebrew-tap"
  merged:   "9c94a73"
upstream:
  origin:   "https://github.com/brightdigit/homebrew-tap.git"
  branch:   "main"
  commit:   "9c94a73"
git-subrepo:
  version:  "0.4.9"
  origin:   "https://github.com/Homebrew/brew"
  commit:   "b48c7994b5"
workflow_dispatch only registers once the file is on the default branch; a
branch push trigger lets us verify the tap write with HOMEBREW_TAP_TOKEN first.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pass url/sha256 through ENV into perl so s/// is not split on https://.

Co-authored-by: Cursor <cursoragent@cursor.com>
@leogdion
leogdion merged commit ca39009 into release-1.0.3 Aug 25, 2026
5 checks passed
@leogdion
leogdion deleted the 49-homebrew branch August 25, 2026 20:03
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.

1 participant