Skip to content

Commit e9df874

Browse files
committed
fix(supabase.com/cli)
closes #14950
1 parent 8eb2ac7 commit e9df874

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

‎projects/supabase.com/cli/package.yml‎

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,25 @@ versions:
88
build:
99
dependencies:
1010
go.dev: ^1.18
11+
bun.sh: ~1.4
12+
pnpm.io: '*'
1113
script:
1214
- run: cd apps/cli-go
13-
if: ">=2.99"
14-
- go mod download
15-
- go build -v -ldflags="$GO_LDFLAGS"
16-
- mkdir -p "{{ prefix }}"/bin
17-
- mv cli "{{ prefix }}"/bin/supabase
15+
if: ">=2.99<3"
16+
- run:
17+
- go mod download
18+
- go build -v -ldflags="$GO_LDFLAGS"
19+
- mkdir -p "{{ prefix }}"/bin
20+
- mv cli "{{ prefix }}"/bin/supabase
21+
if: "<3"
22+
# v3 rewrote the CLI in TypeScript; upstream ships a bun-compiled binary
23+
- run:
24+
- pnpm install --frozen-lockfile
25+
- cd apps/cli
26+
- pnpm pkg set version={{version}}
27+
- bun scripts/build-binary.ts
28+
- install -D dist/supabase "{{ prefix }}"/bin/supabase
29+
if: ">=3"
1830
env:
1931
GO111MODULE: on
2032
GO_LDFLAGS: [-s, -w, "-X=main.Version={{version}}"]
@@ -27,4 +39,6 @@ build:
2739
provides:
2840
- bin/supabase
2941

30-
test: supabase --help
42+
test:
43+
- supabase --help
44+
- test "$(supabase --version)" = "{{version}}"

0 commit comments

Comments
 (0)