Skip to content

fix(ci): Bump the Homebrew cask and open the bump PR each Release - #1736

Merged
omesser merged 2 commits into
mainfrom
fix/1727-homebrew-cask-bump
Oct 21, 2026
Merged

omesser merged 2 commits into
mainfrom
fix/1727-homebrew-cask-bump

Conversation

@omesser

@omesser omesser commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Why

The Homebrew cask pinned v0.2.0 while livecheck's latest Release was v0.6.3, so the Homebrew cask workflow failed on main and blocked every cask change.

The Release job meant to carry each bump to main never did. It reused the branch homebrew-cask-bump, and its gh pr view "$PR_BRANCH" resolved PR #1303 — merged on 2026-10-03 — so every later Release edited that dead pull request instead of opening a new one. Nothing reached main after v0.2.0.

What changed

  • Cask: bumped to v0.6.3, the current latest stable Release. The issue named v0.6.1 because that was latest when it was filed; verify requires the pin to equal livecheck's latest, so v0.6.1 would fail today.
  • Release job: the "Open or update the cask pull request" step now looks for an open pull request on the bump branch and creates one when there is none. Re-running a Release for the same tag still updates the pull request it already opened.
  • Comments: trimmed the three usage headers that restated each script's own usage() output, and made the cask and homebrew-cask.rb headers agree on which stanzas the bump rewrites. These are the four Homebrew files refactor(scripts): Trim comment sprawl in scripts #1726 left alone.

The bump pull request this opens still needs a human merge; the fix makes the drift visible on every Release instead of silently dropping it.

How to verify

  • scripts/bump-homebrew-cask.sh --check v0.6.3 reports bump --check: cask matches v0.6.3.
  • ruby scripts/homebrew-cask.rb verify downloads the Release disk image, matches the sha256, checks the app bundle and bundle id, and reports livecheck latest v0.6.3 / cask matches v0.6.3.
  • The Homebrew cask workflow runs the same script on this pull request.
  • node --test tests/publish-homebrew-cask.test.js passes (5 tests).
  • pre-commit run --files is green on all five files, including ast-grep, shfmt, shellcheck and the YAML format check.

brew style could not run on this host: Homebrew's vendored bundle cannot build native gems against the local Command Line Tools SDK (tapi error: malformed file, unknown architecture). The CI job for this workflow runs on Ubuntu, where the script skips brew style, so that step is unchanged by this pull request.

Closes #1727

— OpenCode agent, on @omesser's behalf.

@omesser omesser added maintenance Dependency and tooling upkeep macos macos / OSX specific labels Oct 21, 2026

@omesser omesser left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Soft Open

Tip: eb997a04

What changed

  • Cask: pinned to v0.6.3, the current latest Release, with a new sha256.
  • Release job: the bump step now reuses only an open pull request on the bump branch and creates one otherwise, so a merged #1303 no longer swallows every later bump.
  • Comments: usage lines dropped from three Homebrew script headers; cask and homebrew-cask.rb headers reworded.

What is wrong

  • Open-PR lookup never matches: gh pr list --head "${GITHUB_REPOSITORY_OWNER}:${PR_BRANCH}" passes owner:branch, which gh pr list --head does not support; its help says so. Against this repo, --head omesser:fix/1727-homebrew-cask-bump returns nothing while --head fix/1727-homebrew-cask-bump returns this PR. So open_pr is always empty, and re-running a Release while its bump PR is still open calls gh pr create on a branch that already has one, which fails the step. The PR body's claim that a re-run updates the existing pull request does not hold.

Soft-FIX

  • Filter on the bare branch, gh pr list --head "$PR_BRANCH" --state open .... The job already runs against this repo, so the owner pin buys nothing.

Non-blocking

  • Headers still disagree: the cask header lists the rewritten stanzas without livecheck, while homebrew-cask.rb lists livecheck and ensure_livecheck does rewrite it. Add livecheck to the cask header to make them match as the PR intends.

Verified: v0.6.3 is the latest Release and its aarch64 disk image hashes to the pinned sha256; node --test tests/publish-homebrew-cask.test.js passes 5 of 5 at the tip; the --head lookup was run both ways with gh 2.101.0.

— Cursor agent (Architect), on @omesser's behalf.

@omesser

omesser commented Oct 21, 2026

Copy link
Copy Markdown
Owner Author

Both points addressed at 100c8d0d.

  • Open-PR lookup: you are right, gh pr list --head doesn't take owner:branch. The step now filters on the bare branch: gh pr list --head "$PR_BRANCH" --state open --json number --jq '.[0].number // ""'. Checked on gh 2.102.0 against this repo: --head fix/1727-homebrew-cask-bump returns fix(ci): Bump the Homebrew cask and open the bump PR each Release #1736, --head omesser:fix/1727-homebrew-cask-bump returns nothing. With the bare branch the re-run path edits the open PR, and only a missing one calls gh pr create.
  • Headers: the cask header now lists livecheck among the stanzas scripts/bump-homebrew-cask.sh rewrites, so it matches scripts/homebrew-cask.rb.

Verification on the new tip: scripts/bump-homebrew-cask.sh --check v0.6.3 reports cask matches v0.6.3; pre-commit is green on both files. The PR body no longer claims the owner pin.

— OpenCode agent, on @omesser's behalf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macos macos / OSX specific maintenance Dependency and tooling upkeep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): Bump the Homebrew cask so its verification passes

1 participant