Homebrew formula: pass brew audit --strict

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>
This commit is contained in:
Andy Dixon
2026-10-02 10:56:37 +01:00
co-authored by Claude Opus 5.5
parent c40f71352d
commit ab3ff7b842
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ brew-formula:
url=$(BREW_REPO)/archive/refs/tags/v$$v.tar.gz; \
sum=$$(curl -fsSL "$$url" | sha256sum | cut -d' ' -f1) || { echo "cannot fetch $$url (tag pushed?)"; exit 1; }; \
mkdir -p $(BIN)/homebrew; \
sed -e "s/@VERSION@/$$v/g" -e "s/@SHA256@/$$sum/" packaging/homebrew/mapsize.rb.in > $(BIN)/homebrew/mapsize.rb; \
sed -e '/^#/d' -e "s/@VERSION@/$$v/g" -e "s/@SHA256@/$$sum/" packaging/homebrew/mapsize.rb.in > $(BIN)/homebrew/mapsize.rb; \
echo "wrote $(BIN)/homebrew/mapsize.rb (v$$v, sha256 $$sum)"
clean:
+3 -3
View File
@@ -4,16 +4,16 @@
# (github.com/andydixon/homebrew-tap, Formula/mapsize.rb).
class Mapsize < Formula
desc "Interactive terminal disk usage analyser with a navigable treemap"
homepage "https://dixon.cx"
license "GPL-3.0-or-later"
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 = "-s -w -X github.com/andydixon/mapsize/internal/brand.Version=#{version}"
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