diff --git a/Formula/kubeone.rb b/Formula/kubeone.rb new file mode 100644 index 0000000..cc092f8 --- /dev/null +++ b/Formula/kubeone.rb @@ -0,0 +1,29 @@ +class Kubeone < Formula + desc "Automates Kubernetes cluster operations on all your cloud, on-prem, edge, and IoT environments" + homepage "https://github.com/kubermatic/kubeone" + version "1.8.0" + url "https://github.com/kubermatic/kubeone/archive/refs/tags/v1.8.0.tar.gz" + sha256 "d4279f0f49fee6db6e9ce8d88cf19d5411b69ad85f4ff4ac514b31a676a1c311" + license "Apache-2.0" + + head "https://github.com/kubermatic/kubeone", branch: "main" + + depends_on "go" => :build + depends_on "terraform" => :optional + + def install + ENV["CGO_ENABLED"] = "true" + ENV["GO111MODULE"] = "on" + ENV["GOFLAGS"] = "-mod=readonly -trimpath" + ENV["GOLDFLAGS"] = "-s -w -extldflags=-zrelro -extldflags=-znow \ + -X k8c.io/kubeone/pkg/cmd.defaultKubeVersion=v1.29.5 \ + -X k8c.io/kubeone/pkg/cmd.version=v1.8.0 \ + -X k8c.io/kubeone/pkg/cmd.commit=c280d14d95ac92a27576851cc058fc84562fcc55" + system "go", "build", "-ldflags=${GOLDFLAGS}", "-v" "-o", "kubeone" + bin.install "kubeone" + end + + test do + system "#{bin}/kubeone", "--help" + end +end