aboutsummaryrefslogtreecommitdiff
path: root/kubent.rb
diff options
context:
space:
mode:
authorChristian Segundo2023-09-12 17:31:31 +0200
committerChristian Segundo2023-09-12 18:34:04 +0200
commit26487b1400fd8b069f688d73e0d91dde2f4e01f1 (patch)
tree013641bd312628c9a22891fa9c7aee4c7b55caae /kubent.rb
parentbcb2fd154d04808c978655d4f9e7a3f1914aeb77 (diff)
downloadhomebrew-tap-26487b1400fd8b069f688d73e0d91dde2f4e01f1.tar.gz
migrate formulae
Diffstat (limited to 'kubent.rb')
-rw-r--r--kubent.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/kubent.rb b/kubent.rb
new file mode 100644
index 0000000..201c973
--- /dev/null
+++ b/kubent.rb
@@ -0,0 +1,23 @@
+class Kubent < Formula
+ desc "Easily check your clusters for use of deprecated APIs"
+ homepage "https://github.com/doitintl/kube-no-trouble"
+ url "https://github.com/doitintl/kube-no-trouble/archive/refs/tags/0.7.0.tar.gz"
+ sha256 "a0517831170b48648aba3fcabfd553350dc75764597a5d7c02bad6253ddeaa90"
+ license "MIT"
+ head "https://github.com/doitintl/kube-no-trouble.git", branch: "master"
+
+ depends_on "go" => [:build]
+
+ def install
+ ldflags = "-s -w"
+
+ if build.head?
+ ldflags += " -X main.version=#{Utils.git_head}"
+ ldflags += " -X main.gitSha=#{Utils.git_head}"
+ else
+ ldflags += " -X main.version=v#{version}"
+ end
+
+ system "go", "build", "-ldflags", ldflags, "-o", bin/"kubent", "./cmd/kubent"
+ end
+end