diff --git a/.github/workflows/cli-package-test.yml b/.github/workflows/cli-package-test.yml index 5aedf26..41b924c 100644 --- a/.github/workflows/cli-package-test.yml +++ b/.github/workflows/cli-package-test.yml @@ -26,7 +26,7 @@ jobs: arch=$(uname -m) echo "Running on architecture: $arch" if [[ "${{ matrix.os }}" == "macos-15-intel" && "$arch" != "x86_64" ]]; then - echo "Error: Expected x86_64 architecture for macOS 13" + echo "Error: Expected x86_64 architecture for macOS Intel" exit 1 elif [[ "${{ matrix.os }}" =~ "macos-1[45]" && "$arch" != "arm64" ]]; then echo "Error: Expected arm64 architecture for ${{ matrix.os }}" @@ -43,9 +43,9 @@ jobs: - name: Install CLI from local formula (PRs only) if: github.event_name == 'pull_request' run: | - mkdir -p "$(brew --repo phasehq/cli)/Formula" - cp ./phase.rb "$(brew --repo phasehq/cli)/Formula/phase.rb" - brew install --build-from-source phasehq/cli/phase + brew tap phasehq/cli + cp ./phase.rb "$(brew --repo phasehq/cli)/phase.rb" + HOMEBREW_NO_AUTO_UPDATE=1 brew install phasehq/cli/phase - name: Install CLI from tap (main branch only) if: github.event_name == 'push' && github.ref == 'refs/heads/main' @@ -56,7 +56,7 @@ jobs: id: extract-version run: | version_line=$(grep 'version' phase.rb) - version=$(echo $version_line | awk -F '\"' '{print $2}') + version=$(echo $version_line | awk -F '"' '{print $2}') echo "version=$version" >> $GITHUB_OUTPUT - name: Test CLI Version diff --git a/phase.rb b/phase.rb index 1f5597c..2b204e4 100644 --- a/phase.rb +++ b/phase.rb @@ -1,29 +1,22 @@ 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" on_macos do on_arm do - url "https://github.com/phasehq/cli/releases/download/v#{version}/phase_cli_macos_arm64_#{version}.zip" - sha256 "5810fa35e1a2c62628a06b293b20f9cd4dc693210295851efb134971266fb444" + url "https://github.com/phasehq/cli/releases/download/v#{version}/phase_cli_#{version}_darwin_arm64" + sha256 "c0e9824b192dac0e4b2cbf80412638e6790bc95f36387362869a31fac21a8184" end on_intel do - url "https://github.com/phasehq/cli/releases/download/v#{version}/phase_cli_macos_amd64_#{version}.zip" - sha256 "02abc2aa71d3e9be9fa2a74af3cd81fb7f349f81485c343b1b9a58b750fd7a78" + url "https://github.com/phasehq/cli/releases/download/v#{version}/phase_cli_#{version}_darwin_amd64" + sha256 "ae3dea0fdedfb4dcff24de4de96a1e0070e45935f90ead3857e08218dba0af25" 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" + bin.install Dir["phase_cli_*"].first => "phase" end test do