chore: migrate Homebrew release flow from GoReleaser brews#104
chore: migrate Homebrew release flow from GoReleaser brews#104
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis pull request refactors the Homebrew release workflow by moving publication from GoReleaser to GitHub Actions. It introduces a template-based Homebrew formula, two automation scripts for rendering and syncing the formula to a tap repository, and corresponding GitHub Actions jobs that handle formula synchronization and version bumping on releases. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/render-homebrew-formula.sh`:
- Around line 23-40: The argument parsing loop currently calls shift 2 for flags
(--version, --sha256, --template, --output) without verifying a following value,
which can cause a "shift count out of range" crash; update the while/case in the
parsing logic to check that "$2" (or $#) is present and non-empty before
performing shift 2 for each flag and, if missing, print a clear error
referencing the specific flag (e.g., mention
--version/--sha256/--template/--output) and exit with non‑zero status; ensure
you update the branches that set VERSION, SHA256, TEMPLATE_PATH, and OUTPUT_PATH
so they validate the argument exists before assigning and shifting.
In `@scripts/sync-homebrew-formula.sh`:
- Around line 23-24: The script currently clones the tap into ${tap_dir} and
later pushes HEAD:${TARGET_BRANCH} but never checks out or ensures a local
branch named TARGET_BRANCH exists; update the flow after cloning (around the git
clone -> push sequence) to explicitly fetch and switch to TARGET_BRANCH (e.g.,
run a git fetch origin ${TARGET_BRANCH} and git checkout -B ${TARGET_BRANCH}
--track origin/${TARGET_BRANCH} if it exists, or create the branch locally if
not) so that subsequent commits are made on the correct branch before running
git add/commit and git push HEAD:${TARGET_BRANCH}; reference the variables
TARGET_BRANCH and tap_dir when locating where to add the checkout logic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ddbb26c9-d555-42d0-8bed-b5735552022d
📒 Files selected for processing (6)
.github/workflows/release.yml.goreleaser.ymldocs/homebrew-release.mdpackaging/homebrew/wtp.rb.tmplscripts/render-homebrew-formula.shscripts/sync-homebrew-formula.sh
💤 Files with no reviewable changes (1)
- .goreleaser.yml
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00d2945908
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
brewsintegration from.goreleaser.ymlwtpmislav/bump-homebrew-formula-action@v3(stable tags only)Notes
brew install satococoa/tap/wtphomebrew-tapis handled in a separate PR