2023-08-13 05:58:11 +03:00
|
|
|
distributable:
|
2023-11-28 19:00:40 +03:00
|
|
|
url: git+https://github.com/tursodatabase/turso-cli
|
|
|
|
ref: v{{version}}
|
2023-08-13 05:58:11 +03:00
|
|
|
|
|
|
|
versions:
|
|
|
|
github: tursodatabase/turso-cli/tags
|
|
|
|
strip: /^v/
|
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/turso
|
|
|
|
|
|
|
|
build:
|
|
|
|
script:
|
|
|
|
- go mod download
|
2023-11-27 18:53:36 +03:00
|
|
|
- go generate --tags=prod ./...
|
2023-08-13 05:58:11 +03:00
|
|
|
- go build $ARGS -ldflags="$LDFLAGS" ./cmd/turso
|
|
|
|
dependencies:
|
|
|
|
go.dev: ^1.20
|
|
|
|
env:
|
|
|
|
GO111MODULE: on
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
ARGS:
|
|
|
|
- -v
|
|
|
|
- -trimpath
|
|
|
|
- -tags=prod
|
|
|
|
- -o "{{prefix}}"/bin/turso
|
|
|
|
LDFLAGS:
|
|
|
|
- -s
|
|
|
|
- -w
|
|
|
|
- -X main.debugMode=false
|
|
|
|
linux:
|
|
|
|
# or segmentation fault
|
|
|
|
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
|
|
|
LDFLAGS:
|
2023-11-27 18:53:36 +03:00
|
|
|
- -buildmode=pie
|
2023-08-13 05:58:11 +03:00
|
|
|
|
2024-05-06 17:32:46 +03:00
|
|
|
test:
|
|
|
|
- run: 'test "$(turso db locations 2>&1 || true)" = "Error: user not logged in, please login with turso auth login"'
|
2024-05-06 17:34:27 +03:00
|
|
|
if: <0.93.1
|
2024-05-06 17:32:46 +03:00
|
|
|
- run: 'test "$(turso db locations 2>&1 || true)" = "You are not logged in, please login with turso auth login before running other commands."'
|
2024-05-06 17:34:27 +03:00
|
|
|
if: '>=0.93.1'
|