Skip to content

Add self-contained Homebrew tap#43

Open
johnfoland wants to merge 1 commit into
vordenken:mainfrom
johnfoland:feature/homebrew-tap
Open

Add self-contained Homebrew tap#43
johnfoland wants to merge 1 commit into
vordenken:mainfrom
johnfoland:feature/homebrew-tap

Conversation

@johnfoland

@johnfoland johnfoland commented Jul 26, 2026

Copy link
Copy Markdown

Adds a Homebrew tap that lives inside this repository; no separate homebrew-autopip repo to create or maintain. The cask sits in Casks/, which is the layout Homebrew looks for in any tap.

brew tap vordenken/autopip https://github.com/vordenken/AutoPiP
brew install --cask vordenken/autopip/autopip

The tap URL is passed explicitly because this repo isn't named homebrew-autopip. Installing the fully qualified name also satisfies the tap trust requirement introduced in Homebrew 6.0, and scopes that trust to this one cask instead of the whole tap.

Casks/autopip.rb

  • Tracks the stable channel. The default Sparkle livecheck strategy doesn't filter by channel, so the newest appcast item would be 2.1.0-beta19; the livecheck block iterates items and picks the newest one with no <sparkle:channel>, which resolves to 2.0.0.
  • auto_updates true, so brew upgrade leaves Sparkle in charge.
  • depends_on macos: :ventura; the app requires 13.5, but Homebrew can only express major releases.
  • Releases are signed with an Apple Development certificate rather than a Developer ID and carry no notarization ticket, so a quarantined install is refused at first launch. A preflight block clears com.apple.quarantine on the staged copy before it's moved into /Applications; clearing it in postflight instead would need App Management (TCC) permission that the calling terminal usually doesn't have. A postflight block then double-checks the installed bundle and raises with recovery instructions if it's still quarantined, rather than silently handing over an app that won't open.
  • zap removes the sandbox containers for com.vd.AutoPiP and com.vd.AutoPiP.Extension.
  • caveats explains that quarantine is cleared automatically and macOS hasn't vetted the build, plus the one remaining manual step: enabling the extension in Safari.

.github/workflows/homebrew-cask.yml

Runs on macOS whenever anything under Casks/ changes: turns the checkout into a real tap, then brew style, brew audit --cask --online --strict, brew livecheck, brew install --cask, an assertion that the installed app and its extension are not quarantined, and brew uninstall --cask --zap.

.github/workflows/homebrew-cask-bump.yml

Daily job that reads the newest stable item from appcast.xml, downloads the DMG, and rewrites version + sha256 if they've drifted. It bails out if the appcast URL stops matching the cask's .../releases/download/v#{version}/AutoPiP.dmg pattern, so a mismatch fails loudly instead of shipping a broken cask.

It's on a schedule rather than release: published because the release workflow cuts releases with a workflow token, and events raised by a workflow token don't start further workflow runs. Happy to fold the bump into build-release.yml instead, or drop it and update the cask by hand; the cask itself doesn't depend on it.

Verification

The cask workflow was run on a fork against macos-15 and passed end to end: brew style, brew audit --cask --online --strict, brew livecheck, brew install --cask (app lands in /Applications with the extension .appex inside it, neither quarantined), and brew uninstall --cask --zap. The bump workflow was run against the current appcast.xml: it resolved 2.0.0, matched the cask, and correctly made no commit.

Closes #42

Summary by Sourcery

Add a self-contained Homebrew tap and cask for AutoPiP and wire it into documentation and CI.

New Features:

  • Introduce a Homebrew cask for AutoPiP under Casks/autopip.rb, including quarantine handling, zap support, and user caveats.
  • Document Homebrew-based installation in the README with the tap and cask install commands.

CI:

  • Add a macOS workflow that installs this repository as a Homebrew tap and validates the cask via style, audit, livecheck, install, quarantine checks, and uninstall.
  • Add a scheduled workflow to bump the Homebrew cask version and checksum to the latest stable release derived from the appcast, committing updates automatically.

Summary by CodeRabbit

  • New Features

    • Added Homebrew installation support for AutoPiP on macOS.
    • Included automatic update support and cleanup of related application components.
    • Added installation guidance to the Quick Start section.
  • Bug Fixes

    • Improved handling of macOS quarantine attributes during installation.
  • Chores

    • Added automated validation for Homebrew installation, auditing, and removal.
    • Added automated daily updates for the Homebrew package when new stable releases are available.

@sourcery-ai

sourcery-ai Bot commented Jul 26, 2026

Copy link
Copy Markdown

🧙 Sourcery has finished reviewing your pull request!


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds an AutoPiP Homebrew cask with Sparkle updates, quarantine handling, cleanup, CI lifecycle validation, automated stable-release bumps, and README installation commands.

Changes

Homebrew cask distribution

Layer / File(s) Summary
AutoPiP cask definition
Casks/autopip.rb, README.md
Defines cask metadata, Sparkle livecheck, macOS requirements, installation and quarantine handling, cleanup behavior, caveats, and Homebrew installation commands.
Homebrew cask validation
.github/workflows/homebrew-cask.yml
Runs Homebrew style, audit, and livecheck checks, installs the cask on macOS, verifies app bundles and quarantine attributes, then uninstalls with zap cleanup.
Automated cask release bumps
.github/workflows/homebrew-cask-bump.yml
Selects the latest stable appcast release, validates its download URL, updates the cask version and SHA256, and pushes the change to main.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Appcast
  participant GitHubActions
  participant CaskFile
  participant GitHubRelease
  Appcast->>GitHubActions: provide latest stable version and DMG URL
  GitHubActions->>CaskFile: compare current version and validate URL
  GitHubActions->>GitHubRelease: download release DMG
  GitHubRelease-->>GitHubActions: return DMG
  GitHubActions->>CaskFile: write version and SHA256
  GitHubActions->>CaskFile: commit and push updated cask
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main change: adding a self-contained Homebrew tap.
Linked Issues check ✅ Passed The PR adds a Homebrew cask, update workflow, validation workflow, and install docs, matching #42's goal.
Out of Scope Changes check ✅ Passed No clear out-of-scope changes are present; the workflows and README support the new Homebrew tap.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Casks/autopip.rb`:
- Around line 54-57: Remove the automatic quarantine-clearing commands from the
preflight block and the corresponding post-install retry around AutoPiP.app.
Leave Gatekeeper quarantine intact by default, or gate any removal behind an
explicit user opt-in and document the manual override path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 89fd2b11-ddc7-4d5e-b91c-11fa49ad85ae

📥 Commits

Reviewing files that changed from the base of the PR and between efb065d and 96700b8.

📒 Files selected for processing (4)
  • .github/workflows/homebrew-cask-bump.yml
  • .github/workflows/homebrew-cask.yml
  • Casks/autopip.rb
  • README.md

Comment thread Casks/autopip.rb
Comment on lines +54 to +57
preflight do
command.run "/usr/bin/xattr",
args: ["-dr", "com.apple.quarantine", "#{staged_path}/AutoPiP.app"],
must_succeed: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not silently bypass Gatekeeper.

This removes quarantine before the user can make an informed launch decision; lines 80-82 retry the same bypass after installation. Require explicit user opt-in (or leave quarantine intact and document the manual override) instead of automatically making an unnotarized build launchable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Casks/autopip.rb` around lines 54 - 57, Remove the automatic
quarantine-clearing commands from the preflight block and the corresponding
post-install retry around AutoPiP.app. Leave Gatekeeper quarantine intact by
default, or gate any removal behind an explicit user opt-in and document the
manual override path.

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.

Request: Add a Homebrew cask for AutoPiP

1 participant