From e674222fdd1351dc86eef993475bad1e0eff52aa Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 23 Nov 2024 17:06:25 -0500 Subject: [PATCH 1/2] kubeone 1.9.0 (new formula) Signed-off-by: Rui Chen kubeone: update desc Co-authored-by: Caleb Xu --- .github/autobump.txt | 1 + Formula/k/kubeone.rb | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 Formula/k/kubeone.rb diff --git a/.github/autobump.txt b/.github/autobump.txt index acc54ac791a0..187893cc4335 100644 --- a/.github/autobump.txt +++ b/.github/autobump.txt @@ -1493,6 +1493,7 @@ kubehound kubekey kubelogin kubent +kubeone kubergrunt kubernetes-cli kubernetes-cli@1.29 diff --git a/Formula/k/kubeone.rb b/Formula/k/kubeone.rb new file mode 100644 index 000000000000..34e6943dbff5 --- /dev/null +++ b/Formula/k/kubeone.rb @@ -0,0 +1,39 @@ +class Kubeone < Formula + desc "Automate cluster operations on all your environments" + homepage "https://kubeone.io" + url "https://github.com/kubermatic/kubeone/archive/refs/tags/v1.9.0.tar.gz" + sha256 "56009d0982e99d624cfa82e433f63075c1e519273c304b4a73496670c1beed2f" + license "Apache-2.0" + head "https://github.com/kubermatic/kubeone.git", branch: "main" + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X k8c.io/kubeone/pkg/cmd.version=#{version} + -X k8c.io/kubeone/pkg/cmd.date=#{time.iso8601} + ] + + system "go", "build", *std_go_args(ldflags:) + + # upstream fish completion support PR, https://github.com/kubermatic/kubeone/pull/3471 + generate_completions_from_executable(bin/"kubeone", "completion", shells: [:bash, :zsh]) + end + + test do + test_config = testpath/"kubeone.yaml" + + test_config.write <<~YAML + apiVersion: kubeone.k8c.io/v1beta2 + kind: KubeOneCluster + + versions: + kubernetes: 1.30.1 + YAML + + assert_match "apiEndpoint.port must be greater than 0", shell_output("#{bin}/kubeone status 2>&1", 15) + + assert_match version.to_s, shell_output("#{bin}/kubeone version") + end +end From 05989a37f79e72715413f137e561542a31a71fbf Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sun, 24 Nov 2024 00:53:51 +0000 Subject: [PATCH 2/2] kubeone: add 1.9.0 bottle. --- Formula/k/kubeone.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Formula/k/kubeone.rb b/Formula/k/kubeone.rb index 34e6943dbff5..33d1e541ca7c 100644 --- a/Formula/k/kubeone.rb +++ b/Formula/k/kubeone.rb @@ -6,6 +6,15 @@ class Kubeone < Formula license "Apache-2.0" head "https://github.com/kubermatic/kubeone.git", branch: "main" + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "5bf47ae6c90784a9ec05d00889a2a5cd4239605c0b354370e017259358e500f1" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "6ae8c30e1d7fc8476110911783fbd553bb0bc18ef276fcd7ac360be3c87859ad" + sha256 cellar: :any_skip_relocation, arm64_ventura: "d3252718f8c30f82539568717059abbb5509295d36856cfe88e0d26048520878" + sha256 cellar: :any_skip_relocation, sonoma: "59d426a43d57cd8d1e77a88ca27845e574c0429a111295f7adc7233771b053b6" + sha256 cellar: :any_skip_relocation, ventura: "df4aeb4046121b37aad39e31424b07d31ec4981e28a5512eece1f673b55d811c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "424a20cb16843151ecd2c5afec8a5d16cb095d479fc42017dcc09cdd358e7d1b" + end + depends_on "go" => :build def install