Order license after sha256, point homepage at the repo, drop the -s -w that std_go_args already adds, and strip the template header from the generated formula. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
1.0 KiB
Plaintext
27 lines
1.0 KiB
Plaintext
# Homebrew formula template for mapsize. `make brew-formula` fills in the
|
|
# version and the checksum of the GitHub source tarball and writes the
|
|
# result to bin/homebrew/mapsize.rb; copy that into your tap
|
|
# (github.com/andydixon/homebrew-tap, Formula/mapsize.rb).
|
|
class Mapsize < Formula
|
|
desc "Interactive terminal disk usage analyser with a navigable treemap"
|
|
homepage "https://github.com/andydixon/mapsize"
|
|
url "https://github.com/andydixon/mapsize/archive/refs/tags/v@VERSION@.tar.gz"
|
|
sha256 "@SHA256@"
|
|
license "GPL-3.0-or-later"
|
|
head "https://github.com/andydixon/mapsize.git", branch: "master"
|
|
|
|
depends_on "go" => :build
|
|
|
|
def install
|
|
ldflags = "-X github.com/andydixon/mapsize/internal/brand.Version=#{version}"
|
|
system "go", "build", *std_go_args(ldflags:), "./cmd/mapsize"
|
|
man1.install "docs/mapsize.1"
|
|
end
|
|
|
|
test do
|
|
assert_match version.to_s, shell_output("#{bin}/mapsize --version")
|
|
(testpath/"data/file.txt").write "hello"
|
|
assert_match "Files", shell_output("#{bin}/mapsize --no-ui #{testpath}/data")
|
|
end
|
|
end
|