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

  on_macos do
    on_arm do
      url "https://www.pyredata.io/dl/cli/1.0.0/pyre_1.0.0_darwin_arm64.tar.gz"
      sha256 "da45229131076fddd341ab4bc63ca274a058eeab5164a57f4245ec9df9d57f36"
    end
    on_intel do
      url "https://www.pyredata.io/dl/cli/1.0.0/pyre_1.0.0_darwin_amd64.tar.gz"
      sha256 "5342d76224a9354cdaea4846fc21fa3b4b0a0e664481bd59d81f8a25f70a708c"
    end
  end
  on_linux do
    on_intel do
      url "https://www.pyredata.io/dl/cli/1.0.0/pyre_1.0.0_linux_amd64.tar.gz"
      sha256 "7aa827faae76350e47ee0354b024fe7082aec290a6f2903a76b1bfb65007bdb0"
    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.0", shell_output("#{bin}/pyre version")
  end
end
