fix: correct Homebrew formula URL generation in release workflow#22
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe release workflow now generates the Homebrew formula by separating template definition from substitution. SHA256 checksums are extracted into shell variables from the checksums file, a quoted heredoc template is written with deferred ChangesHomebrew Formula Generation via Deferred Substitution
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
✨ 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.
Our agent can fix these. Install it.
No application code in the PR — skipped Code Health checks.
Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Problem
The
Generate Homebrew Formulastep inrelease.ymlused an unquoted heredoc (<<EOF). This caused the shell to interpret Ruby's#{version}interpolation syntax as a shell comment (#starts a comment in bash), stripping{version}and leaving literal${version}unexpanded in the generated formula URLs.This is what the broken formula looked like:
Which caused
brew install KDM-cli/tap/kdcto fail with a bad URI error.Fix
<<'FORMULA_TEMPLATE') so the shell does not touch any#or$characters inside itenvsubstto substitute only the known shell variables ($VERSION,$REPO, checksums) after the template is written#{bin}in thetestblock is left untouched byenvsubstsince it is not in the substitution listResult
The generated formula now has hardcoded version strings in all URLs, which is the correct approach for a Homebrew formula.
Summary by CodeRabbit