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:
co-authored by
Claude Opus 5.5
parent
c40f71352d
commit
ab3ff7b842
@@ -73,7 +73,7 @@ brew-formula:
|
|||||||
url=$(BREW_REPO)/archive/refs/tags/v$$v.tar.gz; \
|
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; }; \
|
sum=$$(curl -fsSL "$$url" | sha256sum | cut -d' ' -f1) || { echo "cannot fetch $$url (tag pushed?)"; exit 1; }; \
|
||||||
mkdir -p $(BIN)/homebrew; \
|
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)"
|
echo "wrote $(BIN)/homebrew/mapsize.rb (v$$v, sha256 $$sum)"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
@@ -4,16 +4,16 @@
|
|||||||
# (github.com/andydixon/homebrew-tap, Formula/mapsize.rb).
|
# (github.com/andydixon/homebrew-tap, Formula/mapsize.rb).
|
||||||
class Mapsize < Formula
|
class Mapsize < Formula
|
||||||
desc "Interactive terminal disk usage analyser with a navigable treemap"
|
desc "Interactive terminal disk usage analyser with a navigable treemap"
|
||||||
homepage "https://dixon.cx"
|
homepage "https://github.com/andydixon/mapsize"
|
||||||
license "GPL-3.0-or-later"
|
|
||||||
url "https://github.com/andydixon/mapsize/archive/refs/tags/v@VERSION@.tar.gz"
|
url "https://github.com/andydixon/mapsize/archive/refs/tags/v@VERSION@.tar.gz"
|
||||||
sha256 "@SHA256@"
|
sha256 "@SHA256@"
|
||||||
|
license "GPL-3.0-or-later"
|
||||||
head "https://github.com/andydixon/mapsize.git", branch: "master"
|
head "https://github.com/andydixon/mapsize.git", branch: "master"
|
||||||
|
|
||||||
depends_on "go" => :build
|
depends_on "go" => :build
|
||||||
|
|
||||||
def install
|
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"
|
system "go", "build", *std_go_args(ldflags:), "./cmd/mapsize"
|
||||||
man1.install "docs/mapsize.1"
|
man1.install "docs/mapsize.1"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user