Skip to content

Commit

Permalink
feat(pacaptr): add support for --HEAD installation
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Nov 26, 2023
1 parent 03daf8e commit 6279858
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ jobs:
brew install ./pacaptr.rb
pacaptr --help
pacaptr-head:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- if: startsWith(${{ matrix.os }}, "ubuntu")
run: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
- name: Test install
run: |
brew install ./pacaptr.rb --HEAD
pacaptr --help
alire:
strategy:
matrix:
Expand Down
24 changes: 21 additions & 3 deletions pacaptr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ class Pacaptr < Formula
sha256 "f2a93db76bdcc5bdc81c05864009a0880358736a1dc836035cab3b6446ab610d"

def install
bin.install "pacaptr"
if build.head? then
system "cargo", "install", *std_cargo_args
else
bin.install "pacaptr"
end
end
end

Expand All @@ -23,19 +27,33 @@ def install
sha256 "5dc36e46d73dec2e9c38880b73fe47549214cba51ab71c217328cd5be826a0cf"

def install
bin.install "pacaptr"
if build.head? then
system "cargo", "install", *std_cargo_args
else
bin.install "pacaptr"
end
end
end
if Hardware::CPU.intel?
url "https://github.com/rami3l/pacaptr/releases/download/v0.20.0/pacaptr-linux-amd64.tar.gz"
sha256 "c73010831a97192170fab9975b580a39780cdbadfc60afee1c2ef48a5672d941"

def install
bin.install "pacaptr"
if build.head? then
system "cargo", "install", *std_cargo_args
else
bin.install "pacaptr"
end
end
end
end

head "https://github.com/rami3l/pacaptr.git"

head do
depends_on "rust" => :build
end

test do
system "#{bin}/pacaptr --help"
end
Expand Down

0 comments on commit 6279858

Please sign in to comment.