From aead8eaef4fab92af326864637c1289ef9562cad Mon Sep 17 00:00:00 2001 From: Caleb Allen Date: Fri, 24 Jul 2026 15:30:40 -0400 Subject: [PATCH] fix(packaging): resolve macOS .app bundle by glob in Homebrew formula wails names the bundle after outputfilename (yellowjacket.app), not the hardcoded YellowJacket.app the formula assumed. Glob for build/bin/*.app and its inner executable so casing/rename can't break `brew install`. Co-Authored-By: Claude Opus 4.8 --- packaging/homebrew/Formula/yellowjacket.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packaging/homebrew/Formula/yellowjacket.rb b/packaging/homebrew/Formula/yellowjacket.rb index deefd46..aa0e6f5 100644 --- a/packaging/homebrew/Formula/yellowjacket.rb +++ b/packaging/homebrew/Formula/yellowjacket.rb @@ -45,10 +45,15 @@ class Yellowjacket < Formula "-clean", "-trimpath", "-ldflags", ldflags - # Wails emits a .app bundle on macOS and a bare ELF binary on Linux. + # Wails emits a .app bundle on macOS and a bare ELF binary on Linux. The + # bundle is named after `outputfilename` in wails.json; glob for it so a + # rename (or casing difference) can't silently break the install. if OS.mac? - prefix.install "build/bin/YellowJacket.app" - bin.write_exec_script "#{prefix}/YellowJacket.app/Contents/MacOS/YellowJacket" + app = Dir["build/bin/*.app"].first + odie "wails build produced no .app bundle in build/bin" if app.nil? + prefix.install app + exe = Dir[prefix/"*.app/Contents/MacOS/*"].find { |f| File.executable?(f) } + bin.write_exec_script exe else bin.install "build/bin/yellowjacket" end @@ -57,7 +62,7 @@ class Yellowjacket < Formula test do # The GUI binary has no headless mode; assert it was built and is runnable. if OS.mac? - assert_predicate prefix/"YellowJacket.app/Contents/MacOS/YellowJacket", :executable? + assert_predicate Dir[prefix/"*.app/Contents/MacOS/*"].first, :executable? else assert_predicate bin/"yellowjacket", :executable? end