Bundle the bpm CLI inside the .app for a single-cask Mac install - #14
Merged
Conversation
Real Homebrew constraint found live: a Formula cannot depend on a Cask (depends_on cask: is Cask-only DSL - confirmed by error), and a Formula's install step runs sandboxed, blocked from writing to /Applications at all (Operation not permitted, confirmed by trying it directly). Only Casks are allowed to touch /Applications, by design. So the app now also embeds the plain bpm CLI binary (CGO_ENABLED=0, same MACOSX_DEPLOYMENT_TARGET pin as bpm-tray) alongside bpm-tray inside Contents/MacOS/ - the Homebrew Cask (next commit, in the tap repo) points its `binary` stanza at that same executable, so one `brew install --cask` gives both the CLI on PATH and the app in /Applications. Dropped the now-unused raw bpm-tray tarball artifact. Verified locally: built both binaries, assembled the .app, zipped/unzipped fresh, symlinked the embedded bpm the same way a cask's binary stanza would, confirmed both bpm --help-equivalent output and the tray server work from inside the same bundle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Homebrew Formulas can't depend on Casks, and a Formula's install step is sandboxed from writing to /Applications at all - confirmed both by trying it. So the .app now embeds both bpm-tray and the plain bpm CLI; the Cask's binary stanza (next: homebrew-public) points at the embedded bpm, so one brew install --cask gives you both the CLI and the app. Verified locally end-to-end.