# typed: false
# frozen_string_literal: true

# This file was generated by GoReleaser. DO NOT EDIT.
class GoBookTeacher < Formula
  desc "find teacher's lesson"
  homepage "https://github.com/hiromaily/go-book-teacher"
  version "1.0.0"
  bottle :unneeded

  if OS.mac?
    url "https://github.com/hiromaily/go-book-teacher/releases/download/v1.0.0/go-book-teacher_1.0.0_Darwin_x86_64.tar.gz"
    sha256 "55393342bbf9f33a79e3c6146357efc8a4a3aa373496bf3778856e58986acee3"
  end
  if OS.linux? && Hardware::CPU.intel?
    url "https://github.com/hiromaily/go-book-teacher/releases/download/v1.0.0/go-book-teacher_1.0.0_Linux_x86_64.tar.gz"
    sha256 "e81e4427ed96b0aa088e6b15e5954db81a56bd4ade2d95ef35ac8476d9d5c772"
  end
  if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
    url "https://github.com/hiromaily/go-book-teacher/releases/download/v1.0.0/go-book-teacher_1.0.0_Linux_arm64.tar.gz"
    sha256 "6475077541b1ad4aff24f6c8f48912e0d55e27769a71ce413203ae113a8545f7"
  end

  def install
    bin.install "book-teacher"
    (etc/"book-teacher").install "book-teacher.toml"
    (etc/"book-teacher").install "book-teacher.json"
  end

  def caveats; <<~EOS
    book-teacher has been installed, have fun!
    config file has been installed in /usr/local/etc/book-teacher/book-teacher.toml
    json file has been installed in /usr/local/etc/book-teacher/book-teacher.json
    please modify these files as you want.
    More information:
      https://github.com/hiromaily/go-book-teacher
  EOS
  end

  test do
    system "#{bin}/book-teacher -v"
  end
end
