diff --git a/phase.rb b/phase.rb index 1f5597c..e1e294d 100644 --- a/phase.rb +++ b/phase.rb @@ -1,29 +1,47 @@ +# typed: false +# frozen_string_literal: true + +# This file was generated by GoReleaser. DO NOT EDIT. class Phase < Formula desc "Securely manage your secrets and environment variables with Phase." homepage "https://github.com/phasehq/cli" - version "1.21.3" + version "2.0.0" + license "GPL-3.0" on_macos do - on_arm do - url "https://github.com/phasehq/cli/releases/download/v#{version}/phase_cli_macos_arm64_#{version}.zip" - sha256 "5810fa35e1a2c62628a06b293b20f9cd4dc693210295851efb134971266fb444" + if Hardware::CPU.intel? + url "https://github.com/phasehq/cli/releases/download/v2.0.0/phase_cli_2.0.0_darwin_amd64" + sha256 "96d7717c822a6096cb39a0022645804cc0fd90e0aaa5a57caaeee3320a793b23" + + define_method(:install) do + bin.install Dir.glob("phase_cli_*").first => "phase" + end end + if Hardware::CPU.arm? + url "https://github.com/phasehq/cli/releases/download/v2.0.0/phase_cli_2.0.0_darwin_arm64" + sha256 "9cad8fb847457814d620bf1254ea828705da688ba96fb65a5c86349a3925c964" - on_intel do - url "https://github.com/phasehq/cli/releases/download/v#{version}/phase_cli_macos_amd64_#{version}.zip" - sha256 "02abc2aa71d3e9be9fa2a74af3cd81fb7f349f81485c343b1b9a58b750fd7a78" + define_method(:install) do + bin.install Dir.glob("phase_cli_*").first => "phase" + end end end - def install - # Install the phase binary - bin.install "phase/phase" - - # Install the _internal directory in the bin directory - bin.install "phase/_internal" - - # Set execution permissions for the phase binary - chmod 0755, bin/"phase" + on_linux do + if Hardware::CPU.intel? && Hardware::CPU.is_64_bit? + url "https://github.com/phasehq/cli/releases/download/v2.0.0/phase_cli_2.0.0_linux_amd64" + sha256 "67ca274aaa726c47d3e77e160d2bbc776432aa5cc47805181e30525d6aa41cf2" + define_method(:install) do + bin.install Dir.glob("phase_cli_*").first => "phase" + end + end + if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + url "https://github.com/phasehq/cli/releases/download/v2.0.0/phase_cli_2.0.0_linux_arm64" + sha256 "26bd984458dd0f404356e37fe66ba91a3c396460b067fe56788c25ae87c75961" + define_method(:install) do + bin.install Dir.glob("phase_cli_*").first => "phase" + end + end end test do