42 lines
1.5 KiB
Ruby
42 lines
1.5 KiB
Ruby
class Argo < Formula
|
|
desc "Get stuff done with container-native workflows for Kubernetes"
|
|
homepage "https://argoproj.io"
|
|
url "https://github.com/argoproj/argo.git",
|
|
tag: "v2.12.9",
|
|
revision: "737905345d70ba1ebd566ce1230e4f971993dfd0"
|
|
license "Apache-2.0"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, big_sur: "373e16ebb731b43932863afc2115019f8c44f26e86698cc2aed6ecdb273ad669"
|
|
sha256 cellar: :any_skip_relocation, catalina: "1faf7ac893b790e60262b7664fa87a68a9187fab3a24580529816a03f84e4413"
|
|
sha256 cellar: :any_skip_relocation, mojave: "bcc2f077aeaa397afee18593fcc672d70c477990698023a621ee3026a22183fc"
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
depends_on "node@14" => :build
|
|
depends_on "yarn" => :build
|
|
|
|
def install
|
|
# this needs to be remove to prevent multiple 'operation not permitted' errors
|
|
inreplace "Makefile", "CGO_ENABLED=0", ""
|
|
system "make", "dist/argo"
|
|
bin.install "dist/argo"
|
|
|
|
output = Utils.safe_popen_read("#{bin}/argo", "completion", "bash")
|
|
(bash_completion/"argo").write output
|
|
output = Utils.safe_popen_read("#{bin}/argo", "completion", "zsh")
|
|
(zsh_completion/"_argo").write output
|
|
end
|
|
|
|
test do
|
|
assert_match "argo:",
|
|
shell_output("#{bin}/argo version")
|
|
|
|
# argo consumes the Kubernetes configuration with the `--kubeconfig` flag
|
|
# Since it is an empty file we expect it to be invalid
|
|
touch testpath/"kubeconfig"
|
|
assert_match "invalid configuration",
|
|
shell_output("#{bin}/argo lint --kubeconfig ./kubeconfig 2>&1", 1)
|
|
end
|
|
end
|