class LinkerdAT2115 < Formula desc "Command-line utility to interact with linkerd" homepage "https://linkerd.io" url "https://github.com/linkerd/linkerd2.git", tag: "stable-2.11.5" license "Apache-2.0" keg_only :versioned_formula depends_on "go" => :build def install ENV["CI_FORCE_CLEAN"] = "1" system "bin/build-cli-bin" bin.install Dir["target/cli/*/linkerd"] prefix.install_metafiles generate_completions_from_executable(bin/"linkerd", "completion") end test do run_output = shell_output("#{bin}/linkerd 2>&1") assert_match "linkerd manages the Linkerd service mesh.", run_output version_output = shell_output("#{bin}/linkerd version --client 2>&1") assert_match "Client version: ", version_output assert_match stable.specs[:tag], version_output if build.stable? system bin/"linkerd", "install", "--ignore-cluster" end end