Skip to content

feat: support installing via Homebrew - #3

Merged
RakshithBhat03 merged 1 commit into
mainfrom
homebrew
Oct 5, 2026
Merged

RakshithBhat03 merged 1 commit into
mainfrom
homebrew

Conversation

@RakshithBhat03

Copy link
Copy Markdown
Owner

Prepares portmap for distribution through a Homebrew tap (RakshithBhat03/homebrew-tap).

  • portmap install canonicalizes its own path, which under Homebrew resolves to the versioned keg (/opt/homebrew/Cellar/portmap/0.1.0/bin/portmap). brew upgrade followed by brew cleanup deletes that keg, so the launchd agent would stop working without any error. It now rewrites keg paths to the stable <prefix>/opt/portmap/... symlink. Paths outside Homebrew are left as they are.
  • README: adds a Homebrew install section using brew services, and warns against running both brew services and portmap install (they'd fight over port 7878).
  • .github/workflows/release.yml: on a v* tag push, updates url/sha256 in the tap's formula. Needs a HOMEBREW_TAP_TOKEN secret (fine-grained PAT, contents read/write on the tap repo only). Without it, the job fails with a clear error.

Verified with cargo fmt --check, cargo clippy --all-targets -- -D warnings, and cargo test (72 passed, including new tests for the keg-to-opt path mapping).

portmap install now writes Homebrew's stable opt path into the launchd
plist instead of the versioned Cellar keg, which brew cleanup deletes
after an upgrade. Documents the brew tap install and adds a release
workflow that bumps the tap formula when a version tag is pushed.
@RakshithBhat03
RakshithBhat03 merged commit 9d537d4 into main Oct 5, 2026
1 check passed
@RakshithBhat03
RakshithBhat03 deleted the homebrew branch October 5, 2026 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant