Skip to content

Fix Homebrew checksum matcher in publish workflow#297

Merged
ChiragAgg5k merged 1 commit intomasterfrom
fix/homebrew-publish-checksum-regex
Apr 14, 2026
Merged

Fix Homebrew checksum matcher in publish workflow#297
ChiragAgg5k merged 1 commit intomasterfrom
fix/homebrew-publish-checksum-regex

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

What does this PR do?

Fixes the Homebrew checksum replacement regex in the publish workflow.

The current workflow uses a Ruby regex literal with \Q...\E interpolation when rewriting Formula/appwrite.rb, and that matcher does not match the generated formula content during the release job. The first checksum replacement fails and aborts the publish step.

Failed run:
https://github.com/appwrite/sdk-for-cli/actions/runs/24404302600/job/71283184664

Test Plan

  • Reproduced the failure path locally against the current Formula/appwrite.rb
  • Verified that replacing \Q#{artifact}\E with #{Regexp.escape(artifact)} allows all four checksum substitutions to succeed

Related

  • No linked issue

@ChiragAgg5k ChiragAgg5k merged commit b939392 into master Apr 14, 2026
2 checks passed
@ChiragAgg5k ChiragAgg5k deleted the fix/homebrew-publish-checksum-regex branch April 14, 2026 14:35
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 14, 2026

Greptile Summary

This PR fixes the Homebrew checksum replacement regex in the publish workflow by swapping the Perl-style \Q...\E literal quoting — unsupported by Ruby's Onigmo regex engine — for Regexp.escape(artifact), the idiomatic Ruby equivalent. The surrounding logic (version substitution, branch resolution, syntax validation with ruby -c, and git push) is unchanged and looks correct.

Confidence Score: 5/5

  • This PR is safe to merge — it applies a minimal, targeted fix for a confirmed CI failure with no other logic changes.
  • The single change (\Q...\ERegexp.escape) is the correct Ruby idiom, the fix is validated by the author against the actual formula file, and there are no P0/P1 findings.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/publish.yml Replaces the unsupported Ruby \Q...\E regex quoting with Regexp.escape(artifact), the correct Ruby idiom; remaining workflow logic is unchanged and looks correct.

Reviews (1): Last reviewed commit: "fix: repair Homebrew checksum matcher in..." | Re-trigger Greptile

ChiragAgg5k added a commit that referenced this pull request Apr 14, 2026
Patch release to re-run the publish workflow with the Homebrew
checksum regex fix from #297. The 18.0.0 publish workflow failed
at the formula update step because it ran with the old \Q...\E
regex syntax.
@ChiragAgg5k ChiragAgg5k mentioned this pull request Apr 14, 2026
3 tasks
ChiragAgg5k added a commit that referenced this pull request Apr 14, 2026
Patch release to re-run the publish workflow with the Homebrew
checksum regex fix from #297. The 18.0.0 publish workflow failed
at the formula update step because it ran with the old \Q...\E
regex syntax.
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