From 89c399bb5d2b46a22b6320bca7e90a9317f891e9 Mon Sep 17 00:00:00 2001 From: Ryan Brushett Date: Fri, 25 Nov 2022 12:37:22 -0500 Subject: [PATCH] Add devspace 6.1.1 --- devspace.rb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 devspace.rb diff --git a/devspace.rb b/devspace.rb new file mode 100644 index 0000000..e9f4575 --- /dev/null +++ b/devspace.rb @@ -0,0 +1,30 @@ +class Devspace < Formula + desc "CLI helps develop/deploy/debug apps with Docker and k8s" + homepage "https://devspace.sh/" + url "https://github.com/loft-sh/devspace.git", + tag: "v6.1.1", + revision: "9cd3723afbf14d488a208b0dfb301f9670a51c92" + license "Apache-2.0" + + depends_on "go" => :build + depends_on "kubernetes-cli" + + conflicts_with "homebrew/core/devspace" + + def install + ldflags = %W[ + -s -w + -X main.commitHash=#{Utils.git_head} + -X main.version=#{version} + ] + system "go", "build", *std_go_args(ldflags: ldflags) + end + + test do + help_output = "DevSpace accelerates developing, deploying and debugging applications with Docker and Kubernetes." + assert_match help_output, shell_output("#{bin}/devspace --help") + + init_help_output = "Initializes a new devspace project" + assert_match init_help_output, shell_output("#{bin}/devspace init --help") + end +end