Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

popeye 0.20.2 #163271

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 20 additions & 12 deletions Formula/p/popeye.rb
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
class Popeye < Formula
desc "Kubernetes cluster resource sanitizer"
homepage "https://popeyecli.io"
url "https://github.com/derailed/popeye/archive/refs/tags/v0.20.1.tar.gz"
sha256 "1cd4750a3148af5859d78d2c72a7fb9a0fd0ef5d0fa7983623f88c8e3da6cd15"
url "https://github.com/derailed/popeye/archive/refs/tags/v0.20.2.tar.gz"
sha256 "c84f89723bdc3d1aff20c9b6660b6af6d4a74ac90ea6aad6d50933f18121a192"
license "Apache-2.0"

bottle do
sha256 cellar: :any_skip_relocation, arm64_sonoma: "a327692a0b1cb3baa1783fd308d1072c16ee60640e5c7c2b716e32734ccf2eb3"
sha256 cellar: :any_skip_relocation, arm64_ventura: "058d57c5a8b48724b51d92413840abdafa14d287c7655ce4c4b785851721b56d"
sha256 cellar: :any_skip_relocation, arm64_monterey: "1ca25aeca8fb171edf09e436a548bc8a13c737e0edec67baf04dfdfc4bdd6e6f"
sha256 cellar: :any_skip_relocation, sonoma: "61d6c2a13baba3a58c9f9d77b02237a9219c242989d64aab6d23d03da6f5f3f8"
sha256 cellar: :any_skip_relocation, ventura: "dcc43c08b279b1ffa077713b49c523f55661ec98552bdc506bc128339fd56c90"
sha256 cellar: :any_skip_relocation, monterey: "a23db2b9d87d741c3254b44f5bb7128b9fb7d96118c136e5e86916b2ee0bdfc6"
sha256 cellar: :any_skip_relocation, x86_64_linux: "2e3e73080d7f5ecaa1acdd56788c3abc651a7610bc36f75082bd7775a1eaa2ac"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "fe2d274af946327eb7957d83f4cc40871264abf133d7fd58d0c1628c5a9fe90a"
sha256 cellar: :any_skip_relocation, arm64_ventura: "4292cc222b1316d427c65b14cfc258b2dde69237a07ba1c002c3adad338c8460"
sha256 cellar: :any_skip_relocation, arm64_monterey: "2e6964a0fc3f21e26d60d48556c708cabb8d2a804d7c43e65ce79bb17dce7c4a"
sha256 cellar: :any_skip_relocation, sonoma: "f7353dc43c8d24fde43a798d39eb55f80f28b21ff0a6eb993d54f9407242ee9c"
sha256 cellar: :any_skip_relocation, ventura: "1dcc409c7c06fc80d884a503b4f224e22eccf61f2ee48966f5cce2ee1cb8a2ed"
sha256 cellar: :any_skip_relocation, monterey: "447a5bfc60eea710ede0b36d9c60d4d0feb379fef68a0d8706c0f8d24f01d21a"
sha256 cellar: :any_skip_relocation, x86_64_linux: "9b2113343d8cf7a05e60dfb91f4d55b45eebdceb74c876c82b9970448630684d"
end

depends_on "go" => :build

def install
system "go", "build", *std_go_args(ldflags: "-s -w")
ldflags = %W[
-s -w
-X github.com/derailed/popeye/cmd.version=#{version}
-X github.com/derailed/popeye/cmd.commit=#{tap.user}
-X github.com/derailed/popeye/cmd.date=#{time.iso8601}
]
system "go", "build", *std_go_args(ldflags: ldflags)

generate_completions_from_executable(bin/"popeye", "completion")
end

test do
assert_match "connect: connection refused",
shell_output("#{bin}/popeye --save --out html --output-file report.html", 1)
output = shell_output("#{bin}/popeye --save --out html --output-file report.html 2>&1", 2)
assert_match "connect: connection refused", output

assert_match version.to_s, shell_output("#{bin}/popeye version")
end
end