# Homebrew formula for the Pyre CLI. Generated by cli/packaging/manifests.py
# for release 1.0.61; 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.61"
  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.61/pyre_1.0.61_linux_amd64.tar.gz"
  sha256 "e8bcfb82a7e5f6b292f5e3d67a2b20872a7b06e8b2ad628a7a174b72e7b29fe8"

  on_macos do
    on_arm do
      url "https://www.pyredata.io/dl/cli/1.0.61/pyre_1.0.61_darwin_arm64.tar.gz"
      sha256 "d40a5ddaecb31e6ab16a3493c6b15575e474a2f6cb32936eb41c2b0681772108"
    end
    on_intel do
      url "https://www.pyredata.io/dl/cli/1.0.61/pyre_1.0.61_darwin_amd64.tar.gz"
      sha256 "dc03c8049b263595da37b263eed58b76e9eefe0253ed084cf13d7f2b1788ff0a"
    end
  end
  on_linux do
    on_intel do
      url "https://www.pyredata.io/dl/cli/1.0.61/pyre_1.0.61_linux_amd64.tar.gz"
      sha256 "e8bcfb82a7e5f6b292f5e3d67a2b20872a7b06e8b2ad628a7a174b72e7b29fe8"
    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.61", shell_output("#{bin}/pyre version")
  end
end
