From 0f68b3b8d16fbac6c69365589ba7b9fa9c25d0b7 Mon Sep 17 00:00:00 2001 From: Andy Dixon Date: Fri, 2 Oct 2026 10:54:56 +0100 Subject: [PATCH] mapsize 1.0.0 --- Formula/mapsize.rb | 22 ++++++++++++++++++++++ README.md | 7 +++++++ 2 files changed, 29 insertions(+) create mode 100644 Formula/mapsize.rb create mode 100644 README.md diff --git a/Formula/mapsize.rb b/Formula/mapsize.rb new file mode 100644 index 0000000..a4baeec --- /dev/null +++ b/Formula/mapsize.rb @@ -0,0 +1,22 @@ +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/v1.0.0.tar.gz" + sha256 "ff049d16289c0c824ab8059fb8f1d9e215f79cb3e5b4c81a18d41e536f2e37a1" + 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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..af96099 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# andydixon/tap + +Homebrew tap. + +```sh +brew install andydixon/tap/mapsize +```