Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions packaging/homebrew/bladerunner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,19 @@ class Bladerunner < Formula
depends_on :macos
depends_on arch: :arm64

on_macos do
on_arm do
url "https://github.com/stuffbucket/bladerunner/releases/download/vPLACEHOLDER_VERSION/bladerunner_PLACEHOLDER_VERSION_darwin_aarch64.tar.gz"
sha256 "PLACEHOLDER_SHA256_DARWIN_ARM64"
end
end
# url/sha256 deliberately live in the CLASS BODY, not inside
# `on_macos do -> on_arm do`. Homebrew validates a tap against every platform
# it supports, including arm64_linux, where those blocks do not apply -- which
# leaves the formula with no URL at all:
# Invalid formula (arm64_linux): bladerunner: formula requires at least a URL
# A tap is all-or-nothing, so one formula failing that way stops the ENTIRE tap
# from loading, taking every other formula and cask in it down too.
#
# `depends_on` above does not prevent this -- loading happens before
# dependencies are evaluated -- and it is already what restricts installation
# to arm64 macOS, so the platform blocks were redundant as well as harmful.
url "https://github.com/stuffbucket/bladerunner/releases/download/vPLACEHOLDER_VERSION/bladerunner_PLACEHOLDER_VERSION_darwin_aarch64.tar.gz"
sha256 "PLACEHOLDER_SHA256_DARWIN_ARM64"

def install
bin.install "br"
Expand Down
Loading