class Br < Formula
desc "Agent-first issue tracker (SQLite + JSONL)"
homepage "https://github.com/Dicklesworthstone/beads_rust"
license :cannot_represent
version "0.5.2"
on_macos do
on_arm do
url "https://github.com/Dicklesworthstone/beads_rust/releases/download/v#{version}/br-#{version}-darwin_arm64.tar.gz"
sha256 "d338990921265761426e7d2c81c7b33ea972989af28c24610d4090ccf44e58f2" end
on_intel do
url "https://github.com/Dicklesworthstone/beads_rust/releases/download/v#{version}/br-#{version}-darwin_amd64.tar.gz"
sha256 "ad2c465ae39ea2ef8e4345436a21cd774bf5cf6de4c97baf1cac22b144b81850" end
end
on_linux do
on_arm do
url "https://github.com/Dicklesworthstone/beads_rust/releases/download/v#{version}/br-#{version}-linux_arm64.tar.gz"
sha256 "7ae3a4b5a0e2ea0f11bce3a47f21d3d52f7f96e073aa8eecd5d38422d2d5a668" end
on_intel do
url "https://github.com/Dicklesworthstone/beads_rust/releases/download/v#{version}/br-#{version}-linux_amd64.tar.gz"
sha256 "a1e740b0840464886f066a32e048721d028202e0bff9df024bf9d6fcc49ee0c7" end
end
def install
bin.install "br"
doc.install "LICENSE" if File.exist?("LICENSE")
end
test do
assert_match version.to_s, shell_output("#{bin}/br --version")
system bin/"br", "init"
assert_predicate testpath/".beads", :directory?
assert_predicate testpath/".beads/beads.db", :file?
end
end