Skip to content

Keep the Homebrew cask's layout and version template when bumping it - #106

Open
leoisadev1 wants to merge 1 commit into
mainfrom
leoplayz317/cnv-63-homebrew-cask-bump
Open

leoisadev1 wants to merge 1 commit into
mainfrom
leoplayz317/cnv-63-homebrew-cask-bump

Conversation

@leoisadev1

@leoisadev1 leoisadev1 commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Summary

The release bot's 0.3.0 cask bump (5763e6c) dropped the blank line after sha256 and wrote the url with a literal v0.3.0. brew style rejects that (Cask/StanzaGrouping), so the "Rust (macOS, core)" CI job now fails on every PR that includes main. The bump's patterns ended in \s* under re.M, which also matches the newline and the blank line after. They now stop at the end of the line, and a GitHub release url keeps #{version}.

   sha256 "97784e…"
-  url "https://github.com/opencoredev/convt/releases/download/v0.3.0/convt-macos-arm64.dmg",
+
+  url "https://github.com/opencoredev/convt/releases/download/v#{version}/convt-macos-arm64.dmg",

Evidence

  • Before: CI on Redesign the convt desktop app UI on one visual system #68 failed brew style with "stanza groups should be separated by a single empty line".
    After: Run on the original 0.2.0 cask with the 0.3.0 manifest values, the fixed bump produces exactly the restored Casks/convt.rb.
  • New tests test_bump_changes_only_the_version_and_sha_lines and test_a_github_release_url_keeps_its_version_template fail on the old script and pass now. All 44 release-script tests pass.
  • brew style itself only runs on macOS, so the macOS CI job on this PR is the check for it.

Merge Danger

Door: two-way. It changes a release script and the cask file; nothing is published by merging. The next release's bump uses the fixed script.

Blast radius: the Homebrew cask and its bump in the release workflow.

Fixes CNV-63

Created with Claude Opus 5.5 in Claude Code.


Devin Review

The bump's line patterns ended in \s* under re.M, so replacing the sha256
line also ate the blank line after it, and a GitHub release url was
written out with the literal version. brew style rejects both, which fails
the macOS CI job. The bump now changes only the version and sha256 lines,
and Casks/convt.rb is back in its template form at 0.3.0.

Refs CNV-63

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@greptile-apps

greptile-apps Bot commented Oct 8, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

What we checked:

  • Release bumps keep blank lines: The new expressions stop before newlines. Replacing the version and checksum leaves the separator intact.
  • Matching release URLs stay templated: bump_cask keeps the template when substituting the new version produces the supplied URL. Different URLs still replace it.

Summary

This PR restores the Homebrew cask’s blank separator and #{version} URL. It updates the release script so later bumps keep both.

  • Spaces and tabs can no longer consume the newline after version or sha256.
  • A URL template stays unchanged when it resolves to the manifest’s URL.
  • New tests cover line preservation and the GitHub URL template.
  • No actionable issues found. Tests and brew style were not run during this review.

Reviews (1) · Last reviewed commit: "Keep the Homebrew cask's layout and vers..." · Reviewed by Greptile

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Changes how the release script updates the Homebrew cask file.

The PR appears safe to merge; no actionable issues were found.

What we checked:

  • Release bumps keep blank lines: The new expressions stop before newlines. Replacing the version and checksum leaves the separator intact.
  • Matching release URLs stay templated: bump_cask keeps the template when substituting the new version produces the supplied URL. Different URLs still replace it.

Summary

This PR restores the Homebrew cask’s blank separator and #{version} URL. It updates the release script so later bumps keep both.

  • Spaces and tabs can no longer consume the newline after version or sha256.
  • A URL template stays unchanged when it resolves to the manifest’s URL.
  • New tests cover line preservation and the GitHub URL template.
  • No actionable issues found. Tests and brew style were not run during this review.

Reviews (1) · Last reviewed commit: "Keep the Homebrew cask's layout and vers..." · Reviewed by Greptile

This branch has not been deployed

No deployments
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