Skip to content

Quit and relaunch Vista on Homebrew upgrade#11

Merged
GordonBeeming merged 2 commits into
mainfrom
gb/cask-quit-relaunch
Jun 10, 2026
Merged

Quit and relaunch Vista on Homebrew upgrade#11
GordonBeeming merged 2 commits into
mainfrom
gb/cask-quit-relaunch

Conversation

@GordonBeeming

Copy link
Copy Markdown
Owner

Summary

  • brew upgrade --cask gordonbeeming/tap/vista replaces the .app bundle 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; postflight relaunches the freshly installed one via open -a Vista.
  • The cask is generated by the release workflow's heredoc (.github/workflows/build.yml), so the change lives there and applies to every future release.

Timing

  • Relaunch takes effect on the next upgrade (postflight runs from the cask being installed).
  • Quit-on-upgrade takes effect the upgrade after that — the uninstall step reads the previously-installed cask, which won't carry the stanza until a release that has it is the installed one. From there on, every upgrade quits-then-relaunches.

Test plan

  • Rendered the cask exactly as CI does (heredoc → strip 10-space indent → substitute vars) and ran ruby -c → Syntax OK
  • brew style --cask clean after fixing stanza order (postflight before uninstall); the one remaining depends_on macos: ">= :sonoma" nit is pre-existing and matches the insomnia cask
  • End-to-end only verifiable on a release: after the next version ships, brew upgrade --cask gordonbeeming/tap/vista relaunches Vista; the version after also quits the old instance first

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>
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@GordonBeeming GordonBeeming marked this pull request as ready for review June 10, 2026 01:46
Copilot AI review requested due to automatic review settings June 10, 2026 01:46

Copilot AI 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.

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 postflight stanza 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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment thread .github/workflows/build.yml
Comment thread .github/workflows/build.yml
- 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>
@GordonBeeming GordonBeeming merged commit c852a35 into main Jun 10, 2026
4 checks passed
@GordonBeeming GordonBeeming deleted the gb/cask-quit-relaunch branch June 10, 2026 02:01
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