Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install pkgm (w/out version control :-/) #9

Merged
merged 1 commit into from
Jan 14, 2025
Merged
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
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
Loading