mirror of
https://github.com/encounter/zed.git
synced 2026-03-30 11:44:33 -07:00
9a211b239c
Version 0.5.7 doesn't have the `--database-url` command line flag, so `script/bootstrap` didn't work. Since we use `0.7` in collab (see [here](https://github.com/zed-industries/zed/blob/73fb8277fc699600793e39e8320aa812cce48694/crates/collab/Cargo.toml#L60)) and sqlx 0.7.2 has the `--database-url` flag, we use that instead. Release Notes: - N/A Co-authored-by: Bennet <bennet@zed.dev>
27 lines
646 B
Bash
Executable File
27 lines
646 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
echo "Linux dependencies..."
|
|
script/linux
|
|
else
|
|
echo "installing foreman..."
|
|
which foreman > /dev/null || brew install foreman
|
|
fi
|
|
|
|
# Install sqlx-cli if needed
|
|
if [[ "$(sqlx --version)" != "sqlx-cli 0.7.2" ]]; then
|
|
echo "sqlx-cli not found or not the required version, installing version 0.7.2..."
|
|
cargo install sqlx-cli --version 0.7.2
|
|
fi
|
|
|
|
cd crates/collab
|
|
|
|
# Export contents of .env.toml
|
|
eval "$(cargo run --bin dotenv)"
|
|
|
|
echo "creating databases..."
|
|
sqlx database create --database-url "$DATABASE_URL"
|
|
sqlx database create --database-url "$LLM_DATABASE_URL"
|