Skip to content

nssh: migrate from formula to cask#2

Merged
abizer merged 2 commits intomasterfrom
nssh-cask-migration
May 6, 2026
Merged

nssh: migrate from formula to cask#2
abizer merged 2 commits intomasterfrom
nssh-cask-migration

Conversation

@abizer
Copy link
Copy Markdown
Owner

@abizer abizer commented May 6, 2026

Summary

Companion to abizer/nssh#8, which switches the nssh release pipeline from brews: to homebrew_casks:.

  • Deletes Formula/nssh.rb (stale at v2.1.0; goreleaser will no longer update it). Once Casks/nssh.rb is published by the next release, brew install abizer/tap/nssh will resolve to the cask automatically.

⚠️ Existing formula installs need a manual step

tap_migrations.json was originally part of this PR but Codex correctly pointed out that same-tap formula→cask migrations are a no-op there (Homebrew's migration resolver only fires when the destination tap differs). It's been dropped.

Anyone with the old formula installed will need to run, one time:

```
brew uninstall nssh
brew install --cask abizer/tap/nssh
```

⚠️ Merge ordering

Do not merge this until a post-migration nssh release has actually written Casks/nssh.rb to this tap. Sequence:

  1. Merge nssh#8
  2. Cut a release (Actions → release → Run workflow, `patch`)
  3. Verify `Casks/nssh.rb` lands on master here (auto-committed by github-actions[bot])
  4. Then merge this PR

Otherwise there's a window where `brew install abizer/tap/nssh` 404s.

Test plan

  • After step 3, on a fresh machine: `brew install abizer/tap/nssh` installs the cask
  • On a machine with the old formula installed: `brew uninstall nssh && brew install --cask abizer/tap/nssh` works
  • `nssh` runs without macOS Gatekeeper "damaged / cannot be opened" alert (post-install hook in nssh#8 strips quarantine)

🤖 Generated with Claude Code

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46916d18f4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tap_migrations.json Outdated
@@ -0,0 +1,3 @@
{
"nssh": "abizer/tap"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Point migration to a distinct destination token

This migration entry does not actually redirect anything because the destination resolves back to the same fully-qualified name (abizer/tap/nssh). In Homebrew’s migration resolver (Formulary.tap_formula_name_type / CaskLoader.tap_cask_token_type), migration handling only triggers when the computed new_tapped_name differs from the original; with this value, it remains unchanged, so brew upgrade nssh for existing formula installs will still look for a formula that was just deleted and fail instead of moving users to the cask.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Good catch — you're right. I confirmed this against Formulary.tap_formula_name_type / CaskLoader.tap_cask_token_type: when the destination tap equals the source tap the migration is a no-op, so {"nssh": "abizer/tap"} doesn't redirect anything.

Dropped the file in 2be6b82. Existing formula users will need a one-time brew uninstall nssh && brew install --cask abizer/tap/nssh; the PR description now calls that out explicitly. There isn't a clean Homebrew primitive for same-tap formula→cask migration, and this is a small enough tap that documenting the manual step is fine.

abizer and others added 2 commits May 5, 2026 18:04
The nssh release pipeline now publishes a Homebrew cask under Casks/
instead of a formula (goreleaser is phasing out `brews:` in favor of
`homebrew_casks:`). Drop the old formula and add tap_migrations.json
so existing `brew install abizer/tap/nssh` users get redirected to
the cask on next upgrade.

DO NOT MERGE until a post-migration nssh release has actually written
Casks/nssh.rb to this tap — otherwise `brew install abizer/tap/nssh`
will 404 in the gap between formula deletion and first cask publish.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codex review pointed out (correctly) that a tap_migrations.json entry
mapping `nssh` -> `abizer/tap` is a no-op: Homebrew's migration
resolver only fires when the destination tap differs from the source.
Same-tap formula -> cask isn't something tap_migrations.json can
express, so the file does nothing.

Existing formula users will need a one-time
`brew uninstall nssh && brew install --cask abizer/tap/nssh`. The PR
description has been updated to call that out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@abizer abizer force-pushed the nssh-cask-migration branch from 2be6b82 to 1f41294 Compare May 6, 2026 01:05
@abizer abizer merged commit e4b566a into master May 6, 2026
1 check failed
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