-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
/
Copy pathkops.rb
38 lines (32 loc) · 1.75 KB
/
kops.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class Kops < Formula
desc "Production Grade K8s Installation, Upgrades, and Management"
homepage "https://kops.sigs.k8s.io/"
url "https://github.com/kubernetes/kops/archive/refs/tags/v1.29.0.tar.gz"
sha256 "e681e1b52bd7b2edca4928924401671cf7daf23636fc077471b1b8abc6fdc255"
license "Apache-2.0"
head "https://github.com/kubernetes/kops.git", branch: "master"
livecheck do
url :stable
strategy :github_latest
end
bottle do
sha256 cellar: :any_skip_relocation, arm64_sonoma: "7864a7e7c95488ed857de4004c78f82ac70dcb0bd1927bfea8674f1c54c598a1"
sha256 cellar: :any_skip_relocation, arm64_ventura: "fe9def8e26a00bd8f080343ec8be14f5696060b5722f92ddc453ef05594c3811"
sha256 cellar: :any_skip_relocation, arm64_monterey: "61532940868ffd66896a4d8622849eb102f9a9e6391dca7c0d72fe05d7f1e69b"
sha256 cellar: :any_skip_relocation, sonoma: "ec07b452e773595fa6f299b03f36d850ce26c580749c7d9ec6cef94648967c58"
sha256 cellar: :any_skip_relocation, ventura: "c513352eecab7741170a7969dca283a25fd2ee52d7cc02df582bd4e06028378b"
sha256 cellar: :any_skip_relocation, monterey: "e08acb636ed046b38276ba1ef56d039daa3b64f5c629481d53403d5a785bbc34"
sha256 cellar: :any_skip_relocation, x86_64_linux: "6e3f3f8dd3c0116f0424f4ddd91fc9045e6c939d6692f380849c2a631e52289c"
end
depends_on "go" => :build
depends_on "kubernetes-cli"
def install
ldflags = "-s -w -X k8s.io/kops.Version=#{version}"
system "go", "build", *std_go_args(ldflags:), "k8s.io/kops/cmd/kops"
generate_completions_from_executable(bin/"kops", "completion")
end
test do
assert_match version.to_s, shell_output("#{bin}/kops version")
assert_match "no context set in kubecfg", shell_output("#{bin}/kops validate cluster 2>&1", 1)
end
end