Quit and relaunch Vista on Homebrew upgrade#11
Conversation
brew upgrade replaces the .app bundle but leaves the old process running the now-stale binary, so the new version isn't what's actually running until you quit and reopen by hand. Add two stanzas to the generated cask: uninstall quit: Cmd-Qs the app during the upgrade, and postflight relaunches the freshly installed one. Takes effect from the next release on: relaunch applies on the next upgrade (postflight runs from the installed cask), and quit-on-upgrade the upgrade after (the uninstall step reads the previously-installed cask). Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: GitButler <gitbutler@gitbutler.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
There was a problem hiding this comment.
Pull request overview
Updates the Homebrew cask generated by the release workflow so that brew upgrade --cask gordonbeeming/tap/vista stops the currently running Vista app and then relaunches the newly installed version, avoiding users continuing to run a stale binary after an upgrade.
Changes:
- Add a
postflightstanza to relaunch Vista after the cask is installed/upgraded. - Add an
uninstall quit:stanza (by bundle id) so future upgrades quit the running app before replacing it. - Document the rationale and the Homebrew-canonical stanza ordering inline in the generated cask heredoc.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ebb4f259a
ℹ️ 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".
- Make the postflight relaunch non-fatal (`open -a Vista || true`) so a headless / non-GUI install can't abort the cask install. Launching on every install (including first install) is intentional for a menu-bar indexer, so that behaviour stays. - Add the same quit + relaunch stanzas to Scripts/package-for-homebrew.sh, the manual cask generator, so a hand-run release doesn't emit a cask that drifts from the CI one. Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: GitButler <gitbutler@gitbutler.com>
Summary
brew upgrade --cask gordonbeeming/tap/vistareplaces the.appbundle but leaves the old process running the now-stale binary, so the new version isn't actually running until you quit and reopen by hand. This adds two stanzas to the generated cask so the upgrade handles it.uninstall quit: "com.gordonbeeming.vista"Cmd-Q's the running app during the upgrade;postflightrelaunches the freshly installed one viaopen -a Vista..github/workflows/build.yml), so the change lives there and applies to every future release.Timing
Test plan
ruby -c→ Syntax OKbrew style --caskclean after fixing stanza order (postflight before uninstall); the one remainingdepends_on macos: ">= :sonoma"nit is pre-existing and matches the insomnia caskbrew upgrade --cask gordonbeeming/tap/vistarelaunches Vista; the version after also quits the old instance first