# typed: false
# frozen_string_literal: true

# This file was generated by GoReleaser. DO NOT EDIT.
class Gomigrate < Formula
  desc "Gomigrate is a cli helper that centralizes scripts that we
  cannot put into NSCLI or other CLI utilities
"
  homepage "https://one.rackspace.com/display/RAXM/Tooling"
  version "1.2.65"

  on_macos do
    if Hardware::CPU.intel?
      url "https://dcm-generic-local.artifacts.rackspace.net/artifactory/dcm-generic-local/gomigrate/1.2.65/gomigrate_darwin_amd64.tar.gz"
      sha256 "671780d9ead76637337cff5056cfbf1be56d608e69cba87eb4379ac4691ce802"

      def install
        bin.install "gomigrate"
      end
    end
    if Hardware::CPU.arm?
      url "https://dcm-generic-local.artifacts.rackspace.net/artifactory/dcm-generic-local/gomigrate/1.2.65/gomigrate_darwin_arm64.tar.gz"
      sha256 "790c11f83263573a3dccf1be4d05456596b437acb361472a48c9e96402fface9"

      def install
        bin.install "gomigrate"
      end
    end
  end

  on_linux do
    if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
      url "https://dcm-generic-local.artifacts.rackspace.net/artifactory/dcm-generic-local/gomigrate/1.2.65/gomigrate_linux_amd64.tar.gz"
      sha256 "6c931a98929c0152cb0dfb3186325b733cc795f5325af1069239c08f2a3d0309"
      def install
        bin.install "gomigrate"
      end
    end
  end

  def caveats
    <<~EOS
      Gomigrate v1.2.65 Notes:
        1. Gomigrate will create it's own system keychain called 'Rackspace Internal'
          1a. You may need to reauthenticate gomigrate to this keychain after update because the binary is
              a different signature.
        2. Release changelog located at:
          - https://github.com/RSS-Engineering/DCM-gomigrate/releases/tag/1.2.65
        3. For issues with this tool, please sumbit a GitHub issue here:
          - https://github.com/RSS-Engineering/DCM-gomigrate/issues
        4. For more questions, please reach out to the #dc_migrations Slack channel
    EOS
  end

  test do
    system "#{bin}/gomigrate"
  end
end
