# typed: false
# frozen_string_literal: true

# This file was generated by GoReleaser. DO NOT EDIT.
class LeetcodeTool < Formula
  desc "一个让你更方便刷题的工具"
  homepage "https://github.com/zcong1993/leetcode-tool"
  version "0.4.6"

  on_macos do
    if Hardware::CPU.arm?
      url "https://github.com/zcong1993/leetcode-tool/releases/download/v0.4.6/leetcode-tool_0.4.6_Darwin_arm64.tar.gz"
      sha256 "b438e41782a011486bc00cd5e2fe1be5f808658b0d5b22c319fbdc298f143f6d"

      def install
        bin.install "leetcode-tool"
      end
    end
    if Hardware::CPU.intel?
      url "https://github.com/zcong1993/leetcode-tool/releases/download/v0.4.6/leetcode-tool_0.4.6_Darwin_x86_64.tar.gz"
      sha256 "4dca52892191149a5e424217c74c209837901a5ef2672ba9eb0b8c7279de8a78"

      def install
        bin.install "leetcode-tool"
      end
    end
  end

  on_linux do
    if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
      url "https://github.com/zcong1993/leetcode-tool/releases/download/v0.4.6/leetcode-tool_0.4.6_Linux_arm64.tar.gz"
      sha256 "1e89a5d07383fbb7f049041816b9c82f6c5ed09132152a7c35cfd9accbd6beda"

      def install
        bin.install "leetcode-tool"
      end
    end
    if Hardware::CPU.intel?
      url "https://github.com/zcong1993/leetcode-tool/releases/download/v0.4.6/leetcode-tool_0.4.6_Linux_x86_64.tar.gz"
      sha256 "a7ddf1b47e7974f68047ca4e12cc8a2925d2d3c3b609c9b75bd27120c6c9d287"

      def install
        bin.install "leetcode-tool"
      end
    end
  end

  test do
    system "#{bin}/leetcode-tool -v"
  end
end
