Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/cli-package-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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'
Expand All @@ -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
Expand Down
19 changes: 6 additions & 13 deletions phase.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading