Skip to content

fix(cli): update brew and scoop beta to ship binary under supabase name#5202

Merged
avallete merged 1 commit into
fix/binary-targets-for-platform-packagesfrom
fix/brew-and-scoop-beta-release
May 7, 2026
Merged

fix(cli): update brew and scoop beta to ship binary under supabase name#5202
avallete merged 1 commit into
fix/binary-targets-for-platform-packagesfrom
fix/brew-and-scoop-beta-release

Conversation

@avallete
Copy link
Copy Markdown
Member

@avallete avallete commented May 7, 2026

What kind of change does this PR introduce?

Bug fix.

What is the current behavior?

The beta channel of the new TS-based release pipeline (introduced in #39) ships brew/scoop artifacts that install the binary as supabase-beta instead of supabase. This is a breaking change vs. the historical Go CLI behavior, where Formula/supabase-beta.rb and supabase-beta.json always installed a binary named supabase — only the formula/manifest filename + Ruby class differed between channels.

Concretely, the currently-published v2.99.0-beta.1 artifacts contain:

  • supabase/homebrew-tapFormula/supabase-beta.rb:

    def install
      bin.install "supabase" => "supabase-beta"
      bin.install "supabase-go" if File.exist?("supabase-go")
    end
    
    test do
      assert_match version.to_s, shell_output("#{bin}/supabase-beta --version")
    end
  • supabase/scoop-bucketsupabase-beta.json:

    "bin": [["supabase.exe", "supabase-beta"]]

So users on the beta channel suddenly have to invoke supabase-beta ... instead of supabase ... after a brew upgrade / scoop update, breaking every existing script, CI job, and shell alias.

Root cause

PR #39 added a --name flag to apps/cli/scripts/update-{homebrew,scoop}.ts to support PoC validation against user-owned forks (e.g. supabase-shim-poc). To avoid clashing with reviewers' already-installed supabase CLI during PoC testing, the same flag also renamed the installed binary when --name != "supabase". When release.yml started passing --name supabase-beta for the beta channel, that PoC-only side-effect leaked into production.

Compare with the Go CLI's tools/publish/main.go and the previous Formula/supabase-beta.rb (v2.98.2), which both installed bin.install "supabase" regardless of channel.

What is the new behavior?

--name controls only:

  • Homebrew formula filename (supabase.rb vs supabase-beta.rb) and Ruby class name (Supabase vs SupabaseBeta)
  • Scoop manifest filename (supabase.json vs supabase-beta.json)
  • Commit message

The installed binary is always supabase / supabase.exe, matching the Go CLI's historical behavior. Stable and beta still coexist as separate formulas / manifests in the same tap / bucket — users just choose one or the other (Homebrew detects the supabase binary collision the same way it did with the Go CLI).

Verification (dry-run, --name supabase-beta)

Formula/supabase-beta.rb:

class SupabaseBeta < Formula
  desc "Supabase CLI"
  ...
  def install
    bin.install "supabase"
    bin.install "supabase-go" if File.exist?("supabase-go")
  end

  test do
    assert_match version.to_s, shell_output("#{bin}/supabase --version")
  end
end

supabase-beta.json:

"bin": ["supabase.exe"]

Both match the Go CLI's v2.98.2-era output exactly.

Additional context

Files changed

  • apps/cli/scripts/update-homebrew.ts — drop the rename branch; always bin.install "supabase"; brew test invokes #{bin}/supabase.
  • apps/cli/scripts/update-scoop.ts — drop the alias-tuple branch; binEntry is always "supabase.exe".
  • apps/cli/docs/release-process.md — Ring 2 PoC section now notes that the PoC formula installs a supabase binary, so reviewers must brew uninstall supabase / scoop uninstall supabase first if they have the official CLI installed. Validation snippets updated to invoke supabase --version after brew install supabase-shim-poc.
  • docs/adr/0011-cli-release-and-distribution-strategy.md — Implementation progress §B updated to reflect that --name only controls the filename/class, not the installed binary name.

Hotfix note for already-published v2.99.0-beta.1

The next beta release pushed via release-shared.yml will overwrite Formula/supabase-beta.rb and supabase-beta.json with the corrected shape. If we want to unblock current beta users before the next beta cuts, we'd need to either:

  1. Manually edit Formula/supabase-beta.rb + supabase-beta.json on main in supabase/homebrew-tap / supabase/scoop-bucket to match the new template, or done
  2. Run a manual release.yml workflow_dispatch with channel=beta against the v2.99.0-beta.1 version to republish the brew/scoop side only.

Out of scope for this PR; flagging for the release operator.

Test plan

  • pnpm check:all in apps/cli (types, lint, fmt, knip)
  • pnpm test:core in apps/cli (unit + integration)
  • Local dry-run of update-homebrew.ts --name supabase-beta — generated formula matches the Go CLI's v2.98.2 Formula/supabase-beta.rb shape.
  • Local dry-run of update-scoop.ts --name supabase-beta — generated manifest uses "bin": ["supabase.exe"].
  • Local dry-run with default --name supabase (stable path) — formula + manifest unchanged from prior correct behavior.
  • Once merged + a beta release cuts, verify brew install supabase/homebrew-tap/supabase-beta && supabase --version resolves to the new beta version on macOS.
  • Verify scoop install supabase-beta && supabase --version on Windows.

- Enhanced the `release-process.md` documentation to clarify the behavior of the `--name <custom>` flag for both Homebrew and Scoop, ensuring users understand the implications of installing the CLI under different names.
- Updated `update-homebrew.ts` and `update-scoop.ts` scripts to ensure the installed binary remains consistently named `supabase`, regardless of the formula or manifest filename, allowing for coexistence of different versions without conflicts.
- Fixed the Homebrew formula to correctly install the `supabase-go` sidecar alongside the main binary, improving the installation process for users.
@avallete avallete requested a review from a team as a code owner May 7, 2026 10:26
@avallete avallete changed the base branch from develop to fix/binary-targets-for-platform-packages May 7, 2026 10:27
@avallete avallete requested a review from Coly010 May 7, 2026 10:28
@avallete avallete merged commit f00acf4 into fix/binary-targets-for-platform-packages May 7, 2026
13 checks passed
@avallete avallete deleted the fix/brew-and-scoop-beta-release branch May 7, 2026 10:31
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.

2 participants