From c7492cfeead9e47406ee3f98b8c71e7b889d48cd Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 10 Dec 2022 20:34:12 -0500 Subject: [PATCH] kubefirst 1.10.8 (new formula) kubefirst 1.0.8 (new formula) Closes #117848. Signed-off-by: Rui Chen Signed-off-by: Patrick Linnane Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> --- Formula/kubefirst.rb | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Formula/kubefirst.rb diff --git a/Formula/kubefirst.rb b/Formula/kubefirst.rb new file mode 100644 index 00000000000..a969408bb91 --- /dev/null +++ b/Formula/kubefirst.rb @@ -0,0 +1,36 @@ +class Kubefirst < Formula + desc "GitOps Infrastructure & Application Delivery Platform for kubernetes" + homepage "https://kubefirst.io/" + url "https://github.com/kubefirst/kubefirst/archive/refs/tags/1.10.8.tar.gz" + sha256 "40bb683b0c0e9c32a448d4ff77789baded14addf5b050236afaf9c2548ba967b" + license "MIT" + head "https://github.com/kubefirst/kubefirst.git", branch: "main" + + depends_on "go" => :build + + def install + ldflags = "-s -w -X github.com/kubefirst/kubefirst/configs.K1Version=#{version}" + system "go", "build", *std_go_args(ldflags: ldflags) + + generate_completions_from_executable(bin/"kubefirst", "completion") + end + + test do + system bin/"kubefirst", "info" + assert_match "createdby: installer", (testpath/".kubefirst").read + assert_predicate testpath/"logs", :exist? + + output = <<~EOS + +------------------+--------------------+ + | ADDON NAME | INSTALLED? | + +------------------+--------------------+ + | Addons Available | Supported by | + +------------------+--------------------+ + | kusk | kubeshop/kubefirst | + +------------------+--------------------+ + EOS + assert_match output, shell_output("#{bin}/kubefirst addon list") + + assert_match version.to_s, shell_output("#{bin}/kubefirst version") + end +end