# Homebrew formula for the Pyre CLI. Generated by cli/packaging/manifests.py
# for release 1.0.2; 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.2"
  license "Proprietary"

  on_macos do
    on_arm do
      url "https://www.pyredata.io/dl/cli/1.0.2/pyre_1.0.2_darwin_arm64.tar.gz"
      sha256 "cf40d66cf12c2ebd525c59805b9422faac76bf410ebfdb58fdcf083df00a827b"
    end
    on_intel do
      url "https://www.pyredata.io/dl/cli/1.0.2/pyre_1.0.2_darwin_amd64.tar.gz"
      sha256 "dafdafef7e43bc628bc857afc3a129a5080275279aaa9a192f8d787e0c83313a"
    end
  end
  on_linux do
    on_intel do
      url "https://www.pyredata.io/dl/cli/1.0.2/pyre_1.0.2_linux_amd64.tar.gz"
      sha256 "2e2fa2f9a7afca11870a356be5a94da3c3bdbc8a1f05625a504df983de9ca50c"
    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.2", shell_output("#{bin}/pyre version")
  end
end
