Skip to content

Commit

Permalink
Merge pull request #134722 from Homebrew/PR/134668
Browse files Browse the repository at this point in the history
Replacement for #134668
  • Loading branch information
BrewTestBot authored Jun 23, 2023
2 parents d8aca61 + 88cf014 commit fe07ff2
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions Formula/gdu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ class Gdu < Formula
license "MIT"

bottle do
sha256 cellar: :any_skip_relocation, arm64_ventura: "d9721f1222d207b6c10641323b64fb5f05f6177c7db161e0dc8ad2cdc4e5efce"
sha256 cellar: :any_skip_relocation, arm64_monterey: "d9721f1222d207b6c10641323b64fb5f05f6177c7db161e0dc8ad2cdc4e5efce"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "d9721f1222d207b6c10641323b64fb5f05f6177c7db161e0dc8ad2cdc4e5efce"
sha256 cellar: :any_skip_relocation, ventura: "212c209350ab233d1bb6edb37b10df7a45ebaab214e44434e7343c8fbdc02ffb"
sha256 cellar: :any_skip_relocation, monterey: "212c209350ab233d1bb6edb37b10df7a45ebaab214e44434e7343c8fbdc02ffb"
sha256 cellar: :any_skip_relocation, big_sur: "212c209350ab233d1bb6edb37b10df7a45ebaab214e44434e7343c8fbdc02ffb"
sha256 cellar: :any_skip_relocation, x86_64_linux: "a58b3dad1cc6ec6e264ce3f66efcae4f76a96641621368d0195f8673aba42328"
rebuild 1
sha256 cellar: :any_skip_relocation, arm64_ventura: "7ddc42b8da31e35f87c722fe3c1912e338b15e4af553e1d0bb1d8ac7a4dd600e"
sha256 cellar: :any_skip_relocation, arm64_monterey: "7ddc42b8da31e35f87c722fe3c1912e338b15e4af553e1d0bb1d8ac7a4dd600e"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "7ddc42b8da31e35f87c722fe3c1912e338b15e4af553e1d0bb1d8ac7a4dd600e"
sha256 cellar: :any_skip_relocation, ventura: "aa1ba23f987df2ec8403887234196d7d548819f4725935e4333ed9802d6bacae"
sha256 cellar: :any_skip_relocation, monterey: "aa1ba23f987df2ec8403887234196d7d548819f4725935e4333ed9802d6bacae"
sha256 cellar: :any_skip_relocation, big_sur: "aa1ba23f987df2ec8403887234196d7d548819f4725935e4333ed9802d6bacae"
sha256 cellar: :any_skip_relocation, x86_64_linux: "6830146fdaba73d2c0bd32cfd4de1fcd9f1c5d3b097acd6fa0d062ad81a3e5e5"
end

depends_on "go" => :build
Expand All @@ -30,16 +31,23 @@ def install
-X "github.com/dundee/gdu/v#{major}/build.User=#{user}"
]

system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/gdu"
system "go", "build", *std_go_args(ldflags: ldflags, output: "#{bin}/gdu-go"), "./cmd/gdu"
end

def caveats
<<~EOS
To avoid a conflict with `coreutils`, `gdu` has been installed as `gdu-go`.
EOS
end

test do
mkdir_p testpath/"test_dir"
(testpath/"test_dir"/"file1").write "hello"
(testpath/"test_dir"/"file2").write "brew"

assert_match version.to_s, shell_output("#{bin}/gdu -v")
assert_match "colorized", shell_output("#{bin}/gdu --help 2>&1")
assert_match "4.0 KiB file1", shell_output("#{bin}/gdu --non-interactive --no-progress #{testpath}/test_dir 2>&1")
assert_match version.to_s, shell_output("#{bin}/gdu-go -v")
assert_match "colorized", shell_output("#{bin}/gdu-go --help 2>&1")
output = shell_output("#{bin}/gdu-go --non-interactive --no-progress #{testpath}/test_dir 2>&1")
assert_match "4.0 KiB file1", output
end
end

0 comments on commit fe07ff2

Please sign in to comment.