homebrew-core/Formula/kubent.rb

26 lines
793 B
Ruby
Raw Normal View History

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.git",
tag: "0.7.0",
revision: "d1bb4e5fd6550b533b2013671aa8419d923ee042"
license "MIT"
head "https://github.com/doitintl/kube-no-trouble.git", branch: "master"
depends_on "go" => :build
def install
ldflags = %W[
-s -w
-X main.version=#{version}
-X main.gitSha=#{Utils.git_head}
]
system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/kubent"
end
test do
assert_match "no configuration has been provided", shell_output("#{bin}/kubent 2>&1")
assert_match version.to_s, shell_output("#{bin}/kubent --version 2>&1")
end
end