Commit 6857b36
committed
fix(cli): inject version into Go binary via ldflags
The legacy CLI shell forwards most commands to the bundled `supabase-go`
binary, whose upgrade banner reports the currently installed version
from `utils.Version` — a string assigned via `-ldflags -X` at compile
time. The Bun build script was missing that injection, so every release
shipped a Go binary with `utils.Version=""`, producing:
A new version of Supabase CLI is available: v2.100.1 (currently installed v)
and triggering the upgrade prompt on every invocation (semver.Compare
treats the empty string as less than any valid version).
Restore the `-X github.com/supabase/cli/internal/utils.Version=...`
ldflag in `apps/cli/scripts/build.ts` so the npm version is baked into
the Go binary at build time, matching the prior `.goreleaser.yml`
behavior.
Fixes #53081 parent e123b51 commit 6857b36
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
0 commit comments