2024-03-28 21:31:11 +03:00
|
|
|
distributable:
|
|
|
|
url: https://github.com/bytebase/bytebase/archive/refs/tags/{{version.tag}}.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
|
|
|
github: bytebase/bytebase
|
|
|
|
|
|
|
|
dependencies:
|
|
|
|
nodejs.org: '>=20.10'
|
|
|
|
|
2024-04-25 19:57:48 +03:00
|
|
|
platforms:
|
|
|
|
- linux
|
|
|
|
- darwin/aarch64
|
|
|
|
# this changed in 2.16.0:
|
|
|
|
# case runtime.GOOS == "darwin" && runtime.GOARCH == "arm64":
|
|
|
|
# tarName = "mongoutil-1.6.1-darwin-arm64.txz"
|
|
|
|
# case runtime.GOOS == "linux" && runtime.GOARCH == "amd64":
|
|
|
|
# tarName = "mongoutil-1.6.1-linux-amd64.txz"
|
|
|
|
# case runtime.GOOS == "linux" && runtime.GOARCH == "arm64":
|
|
|
|
# tarName = "mongoutil-1.6.1-linux-arm64.txz"
|
|
|
|
# default:
|
|
|
|
# return "", "", errors.Errorf("unsupported platform: %s/%s", runtime.GOOS, runtime.GOARCH)
|
|
|
|
|
2024-03-28 21:31:11 +03:00
|
|
|
build:
|
|
|
|
dependencies:
|
2024-04-25 19:57:48 +03:00
|
|
|
go.dev: =1.21.6
|
2024-03-28 21:31:11 +03:00
|
|
|
pnpm.io: '*'
|
|
|
|
linux:
|
2024-04-25 19:57:48 +03:00
|
|
|
kerberos.org: 1 # added in 2.16.0
|
2024-03-28 21:31:11 +03:00
|
|
|
# error: invalid linker name in argument '-fuse-ld=gold'
|
|
|
|
gnu.org/gcc: '*'
|
|
|
|
script:
|
2024-04-11 19:30:29 +03:00
|
|
|
# otherwise segfaults
|
|
|
|
- run: sed -i 's/-ldflags "/-ldflags "-buildmode=pie /' build_bytebase.sh
|
|
|
|
if: linux
|
|
|
|
working-directory: scripts
|
|
|
|
- ./scripts/build_bytebase.sh {{prefix}}/bin
|
2024-03-28 21:31:11 +03:00
|
|
|
|
|
|
|
provides:
|
|
|
|
- bin/bytebase
|
|
|
|
|
|
|
|
test:
|
|
|
|
dependencies:
|
|
|
|
curl.se: '*'
|
|
|
|
pkgx.sh: ^1
|
|
|
|
script:
|
|
|
|
- bytebase version | grep {{version}}
|
|
|
|
# we'd love to test this more on linux, but we have issues running initdb as root;
|
|
|
|
# so, we'll satisfy ourselves with the above and testing on darwin
|
|
|
|
- run: exit 0
|
|
|
|
if: linux
|
|
|
|
|
2024-04-25 21:28:26 +03:00
|
|
|
- FREE_PORT=$(pkgx get-port | tail -n1)
|
2024-03-28 21:31:11 +03:00
|
|
|
- bytebase --port $FREE_PORT > out.log 2>&1 &
|
|
|
|
- PID=$!
|
|
|
|
- sleep 35
|
|
|
|
- curl -L http://localhost:$FREE_PORT | grep 'Bytebase' || cat out.log
|
|
|
|
- kill $PID
|
|
|
|
- cat out.log | grep "has started on port $FREE_PORT"
|