# Homebrew formula for the Pyre CLI. Generated by cli/packaging/manifests.py
# for release 1.0.56; published to the tap repository by deploy-cli.sh.
class Pyre < Formula
  desc "Pyre command-line client: volumes, restore points, views, appliances, hubs"
  homepage "https://www.pyredata.io"
  version "1.0.56"
  license "Proprietary"
  # Homebrew validates the formula for every platform it knows, including
  # Linux arm64, and refuses to tap one that leaves a platform without a
  # URL. The top-level url is that fallback (there is no Linux arm64
  # build yet); the on_* blocks below pick the right archive elsewhere.
  url "https://www.pyredata.io/dl/cli/1.0.56/pyre_1.0.56_linux_amd64.tar.gz"
  sha256 "83d5dde6887e947289a15b0b09da4d75f2823bba035a4c18fa8b7d29c3d71ecc"

  on_macos do
    on_arm do
      url "https://www.pyredata.io/dl/cli/1.0.56/pyre_1.0.56_darwin_arm64.tar.gz"
      sha256 "c6877875c63618ba36d8b282170a5bdb85387885ac33e5ef68a1e987257bd9c5"
    end
    on_intel do
      url "https://www.pyredata.io/dl/cli/1.0.56/pyre_1.0.56_darwin_amd64.tar.gz"
      sha256 "dfb1226060e35096fe96cc8f5f06c1d0f823a84f8eefd0632fbcca7e76b9e3d7"
    end
  end
  on_linux do
    on_intel do
      url "https://www.pyredata.io/dl/cli/1.0.56/pyre_1.0.56_linux_amd64.tar.gz"
      sha256 "83d5dde6887e947289a15b0b09da4d75f2823bba035a4c18fa8b7d29c3d71ecc"
    end
  end

  def install
    bin.install "pyre"
    bash_completion.install "completions/pyre.bash" => "pyre"
    zsh_completion.install "completions/_pyre"
    fish_completion.install "completions/pyre.fish"
    man1.install Dir["man/*.1.gz"]
    doc.install "CHANGELOG.md", "README.txt"
  end

  test do
    assert_match "pyre 1.0.56", shell_output("#{bin}/pyre version")
  end
end
