diff --git a/Formula/devspace.rb b/Formula/devspace.rb new file mode 100644 index 0000000000..cd814d9d5a --- /dev/null +++ b/Formula/devspace.rb @@ -0,0 +1,31 @@ +class Devspace < Formula + desc "CLI helps develop/deploy/debug apps with Docker and k8s" + homepage "https://devspace.cloud/docs" + url "https://github.com/devspace-cloud/devspace.git", + :tag => "v3.5.8", + :revision => "3efff768ae61fffbfb224a51406ba54e6b670a02" + + depends_on "go" => :build + depends_on "kubernetes-cli" + + def install + ENV["GOPATH"] = buildpath + ENV["GO111MODULE"] = "on" + + dir = buildpath/"src/github.com/devspace-cloud/devspace" + dir.install buildpath.children + + cd dir do + system "go", "build", "-o", bin/"devspace" + prefix.install_metafiles + end + 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