kubekey 2.0.0 (new formula)

Closes #92655.

Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Max Eisner 2022-01-06 22:39:56 +01:00 committed by BrewTestBot
parent fbd4a7755b
commit 596ae5498e
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
2 changed files with 33 additions and 0 deletions

1
Aliases/kk Symbolic link
View File

@ -0,0 +1 @@
../Formula/kubekey.rb

32
Formula/kubekey.rb Normal file
View File

@ -0,0 +1,32 @@
class Kubekey < Formula
desc "Installer for Kubernetes and / or KubeSphere, and related cloud-native add-ons"
homepage "https://kubesphere.io"
url "https://github.com/kubesphere/kubekey.git",
tag: "v2.0.0",
revision: "ff9d30b7a07ed2219b0c82f1946307dbcc76975b"
license "Apache-2.0"
depends_on "go" => :build
def install
ldflags = %W[
-s -w
-X github.com/kubesphere/kubekey/version.version=v#{version}
-X github.com/kubesphere/kubekey/version.gitCommit=#{Utils.git_head}
-X github.com/kubesphere/kubekey/version.gitTreeState=clean
]
system "go", "build", *std_go_args(ldflags: ldflags, output: bin/"kk"), "./cmd"
(zsh_completion/"_kk").write Utils.safe_popen_read(bin/"kk", "completion", "--type", "zsh")
(bash_completion/"kk").write Utils.safe_popen_read(bin/"kk", "completion", "--type", "bash")
end
test do
version_output = shell_output(bin/"kk version")
assert_match "Version:\"v#{version}\"", version_output
assert_match "GitTreeState:\"clean\"", version_output
system bin/"kk", "create", "config", "-f", "homebrew.yaml"
assert_predicate testpath/"homebrew.yaml", :exist?
end
end