diff --git a/phase.rb b/phase.rb index 1f8bc9e..1f5597c 100644 --- a/phase.rb +++ b/phase.rb @@ -1,47 +1,29 @@ -# 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 "2.0.0-rc.1" - license "GPL-3.0" + version "1.21.3" on_macos do - if Hardware::CPU.intel? - url "https://github.com/phasehq/cli/releases/download/v2.0.0-rc.1/phase_cli_2.0.0-rc.1_darwin_amd64" - sha256 "c630345782aafed597164485c6ff0a58d000ced542403e93a53d5e131bfb8a70" - - define_method(:install) do - bin.install "phase" - end + on_arm do + url "https://github.com/phasehq/cli/releases/download/v#{version}/phase_cli_macos_arm64_#{version}.zip" + sha256 "5810fa35e1a2c62628a06b293b20f9cd4dc693210295851efb134971266fb444" end - if Hardware::CPU.arm? - url "https://github.com/phasehq/cli/releases/download/v2.0.0-rc.1/phase_cli_2.0.0-rc.1_darwin_arm64" - sha256 "6ac87c38866dcf8ebb52f6c91b04f09733cfbf1f892b650a461aa2f88a3e7d1a" - define_method(:install) do - bin.install "phase" - end + on_intel do + url "https://github.com/phasehq/cli/releases/download/v#{version}/phase_cli_macos_amd64_#{version}.zip" + sha256 "02abc2aa71d3e9be9fa2a74af3cd81fb7f349f81485c343b1b9a58b750fd7a78" end end - on_linux do - if Hardware::CPU.intel? && Hardware::CPU.is_64_bit? - url "https://github.com/phasehq/cli/releases/download/v2.0.0-rc.1/phase_cli_2.0.0-rc.1_linux_amd64" - sha256 "1d9fe7b092d9b79786206fed56d1b68da1336ccab00f146587f3fdfb3e9b0a49" - define_method(:install) do - bin.install "phase" - end - end - if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://github.com/phasehq/cli/releases/download/v2.0.0-rc.1/phase_cli_2.0.0-rc.1_linux_arm64" - sha256 "77bcad7e4ed2d9a30fe329e54b1acf6b3f55dfe8c22a3b236e7c0b37521c1388" - define_method(:install) do - bin.install "phase" - 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" end test do