From bc087ac150df7c0ece5e987df465fdabdd4e56f0 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Fri, 5 Jan 2024 14:04:38 -0500 Subject: [PATCH 1/2] k8sgpt 0.3.25 (new formula) Signed-off-by: Rui Chen --- Formula/k/k8sgpt.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Formula/k/k8sgpt.rb diff --git a/Formula/k/k8sgpt.rb b/Formula/k/k8sgpt.rb new file mode 100644 index 0000000000000..cccc8d27b8b9e --- /dev/null +++ b/Formula/k/k8sgpt.rb @@ -0,0 +1,27 @@ +class K8sgpt < Formula + desc "Scanning your k8s clusters, diagnosing, and triaging issues in simple English" + homepage "https://k8sgpt.ai/" + url "https://github.com/k8sgpt-ai/k8sgpt/archive/refs/tags/v0.3.25.tar.gz" + sha256 "db8304df35089fb69eb16b8720f902dee508f1cbbec2ed4015a8d343d8701868" + license "Apache-2.0" + head "https://github.com/k8sgpt-ai/k8sgpt.git", branch: "main" + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X main.version=#{version} + -X main.commit=#{tap.user} + -X main.date=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags: ldflags) + end + + test do + output = shell_output("#{bin}/k8sgpt analyze --explain --filter=Service", 1) + assert_match "try setting KUBERNETES_MASTER environment variable", output + + assert_match version.to_s, shell_output("#{bin}/k8sgpt version") + end +end From 9741dcd64b09a5856181fb320fc21cd80c0851e8 Mon Sep 17 00:00:00 2001 From: Patrick Linnane Date: Fri, 5 Jan 2024 21:15:41 +0000 Subject: [PATCH 2/2] k8sgpt: add 0.3.25 bottle. --- Formula/k/k8sgpt.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Formula/k/k8sgpt.rb b/Formula/k/k8sgpt.rb index cccc8d27b8b9e..9721bcb83a0c6 100644 --- a/Formula/k/k8sgpt.rb +++ b/Formula/k/k8sgpt.rb @@ -6,6 +6,16 @@ class K8sgpt < Formula license "Apache-2.0" head "https://github.com/k8sgpt-ai/k8sgpt.git", branch: "main" + bottle do + sha256 cellar: :any_skip_relocation, arm64_sonoma: "b125fc1c59cbe3c2f40e308a1b59335e24d01d40de9e8c8c532ff0806c58772e" + sha256 cellar: :any_skip_relocation, arm64_ventura: "7b9f47f34876cd66dc26d3fdc0004b3a303be304e5457f8689fc11eeecec5473" + sha256 cellar: :any_skip_relocation, arm64_monterey: "738027837ec9cf1455e94b993f7567a8b34737400c58acf1f0254a66f475bc34" + sha256 cellar: :any_skip_relocation, sonoma: "660db34585ab85e243488615e8d3c3f31b0b445498237949e6a00516158cbce6" + sha256 cellar: :any_skip_relocation, ventura: "1f2091334f8d8db39fe70d22453a52158391c57a792aac0ac06484a9c0653a50" + sha256 cellar: :any_skip_relocation, monterey: "1d387656bc6884d5f4632a9af5d7a4024e2260b96e93a218751da7bff0ea069c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "24bc6361c233364ebc19e20113f952e656705ae8172d4d1833775528c36efc64" + end + depends_on "go" => :build def install