diff --git a/Formula/macdeploycheck.rb b/Formula/macdeploycheck.rb index b12ef959f..de0d5b5e9 100644 --- a/Formula/macdeploycheck.rb +++ b/Formula/macdeploycheck.rb @@ -2,16 +2,16 @@ class Macdeploycheck < Formula desc "Sanity checks a macOS .app bundle for accidental Homebrew runtime dependencies" homepage "https://github.com/strawberrymusicplayer/strawberry" version "0.1.0" + # Homebrew requires a URL stanza. Use the script shipped in this tap (file://), + # so installs always match the tapped revision. + url "file://#{File.expand_path("../../dist/macos/macdeploycheck.sh", __dir__)}" sha256 :no_check license "MIT" depends_on :macos def install - # Install the script from the tapped repo working tree. - # (__dir__ is .../Formula, so ../.. is the tap root) - script = File.expand_path("../../dist/macos/macdeploycheck.sh", __dir__) - bin.install script => "macdeploycheck" + bin.install "macdeploycheck.sh" => "macdeploycheck" end test do diff --git a/build_tools/macos/install_brew_deps.sh b/build_tools/macos/install_brew_deps.sh index 811d02240..878b8f0c7 100755 --- a/build_tools/macos/install_brew_deps.sh +++ b/build_tools/macos/install_brew_deps.sh @@ -94,10 +94,10 @@ run_with_heartbeat "Refreshing strawberry/local tap clone" bash -lc ' ' for f in kdsingleapplication-qt6 qtsparkle-qt6 sparkle-framework libgpod macdeploycheck; do - if ! brew info "strawberry/local/${f}" >/dev/null 2>&1; then - echo "Error: Missing formula strawberry/local/${f} in the tapped repo." >&2 + if ! info_out="$(brew info "strawberry/local/${f}" 2>&1 >/dev/null)"; then + echo "Error: Unable to load formula strawberry/local/${f} from the tapped repo (brew info failed)." >&2 echo "Details (brew info):" >&2 - brew info "strawberry/local/${f}" >&2 || true + echo "$info_out" >&2 echo "If you recently added/changed formulae, ensure they are committed, then refresh the tap:" >&2 echo " git -C \"$(brew --repo strawberry/local)\" pull --ff-only" >&2 exit 1