# typed: false
# frozen_string_literal: true

# This file was generated by GoReleaser. DO NOT EDIT.
class Cli < Formula
  desc "Use Ory from the your terminal!"
  homepage "https://www.ory.sh"
  version "0.1.34"
  license "Apache-2.0"

  on_macos do
    if Hardware::CPU.arm?
      url "https://github.com/ory/cli/releases/download/v0.1.34/ory_0.1.34-macOS_sqlite_arm64.tar.gz"
      sha256 "11504e17f91373ba82720b047840edfb959435e0752f4fcae4c33fc1b1880880"

      def install
        bin.install "ory"
      end
    end
    if Hardware::CPU.intel?
      url "https://github.com/ory/cli/releases/download/v0.1.34/ory_0.1.34-macOS_sqlite_64bit.tar.gz"
      sha256 "ad7d650e6a96d00184a192b457b75b9cf5a04e31520a104d2d1736a61ae1eb3a"

      def install
        bin.install "ory"
      end
    end
  end

  on_linux do
    if Hardware::CPU.intel?
      url "https://github.com/ory/cli/releases/download/v0.1.34/ory_0.1.34-linux_sqlite_64bit.tar.gz"
      sha256 "290067574846cbe7bc3b4ede34c98c934b2e2ed08af56f9e2f088bbb6d756d57"

      def install
        bin.install "ory"
      end
    end
    if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
      url "https://github.com/ory/cli/releases/download/v0.1.34/ory_0.1.34-linux_sqlite_arm64.tar.gz"
      sha256 "ff70d9f359053db87c28abac31ccdbb4650b97d60aad0a4c577dd52201af854b"

      def install
        bin.install "ory"
      end
    end
    if Hardware::CPU.arm? && !Hardware::CPU.is_64_bit?
      url "https://github.com/ory/cli/releases/download/v0.1.34/ory_0.1.34-linux_sqlite_armv6.tar.gz"
      sha256 "19ceee1783e0b60e2a4c7d766cb6dd24932cf7da6ffd7c37c35495720438ef8d"

      def install
        bin.install "ory"
      end
    end
  end

  test do
    system "#{bin}/ory version"
  end
end
