Skip to content

Commit

Permalink
brew install pkgxdev/made/pkgm
Browse files Browse the repository at this point in the history
Needs bump to be amended to be able to bump the right formula
  • Loading branch information
mxcl committed Jan 13, 2025
1 parent ff25d4d commit 847f15a
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 6 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.pkgm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
pull_request:
paths:
- pkgm.rb

jobs:
smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Homebrew/actions/setup-homebrew@master
- run: brew install --build-from-source ./pkgm.rb
- run: brew test pkgm
- run: brew audit pkgm
File renamed without changes.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Installing `pkgx` with Homebrew
# pkgx Tap

```sh
$ brew install pkgxdev/made/pkgx
brew install pkgxdev/made/pkgx || curl https://pkgx.sh | sh
```

## Uninstall

```sh
brew uninstall pkgxdev/made/pkgx || sudo rm /usr/local/bin/pkg[xm]
```
27 changes: 27 additions & 0 deletions pkgm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
class Pkgm < Formula
desc "Install Anything"
homepage "https://github.com/pkgxdev/pkgm"
sha256 "981e92983199e4d6745f30777cbcb600457649e5a3a473ff489034cb769dc99e"
url "https://github.com/pkgxdev/pkgm/releases/download/v0.3.0/pkgm-0.3.0.tgz"
license "Apache-2.0"

livecheck do
url :stable
strategy :github_latest
end

depends_on "deno"
depends_on "pkgxdev/made/pkgx"

def install
# use the brew deno rather than pkgx deno
# NOTE maybe pointless since internally it uses `pkgx deno` still, but we could fix that…
inreplace "pkgm", /pkgx deno.* run/, "deno run"

bin.install("pkgm")
end

test do
assert_equal shell_output("#{bin}/pkgm --version").chomp, "pkgm #{version}"
end
end
4 changes: 0 additions & 4 deletions pkgx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ class Pkgx < Formula
depends_on "unzip" => :build # deno >=1.39.1 uses unzip when remote-fetching their compilable runtime
depends_on "rust" => :build

on_linux do
depends_on "sqlite"
end

def install
if File.file? "Cargo.toml"
system "cargo", "build", "--release"
Expand Down

0 comments on commit 847f15a

Please sign in to comment.