Skip to content

Commit e95ca49

Browse files
committed
fix install-deps
1 parent 2bd633d commit e95ca49

File tree

3 files changed

+28
-31
lines changed

3 files changed

+28
-31
lines changed

.evergreen/install-dependencies.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
11
#!/bin/bash
22

33
set -eu
4-
bash "$PROJECT_DIRECTORY/.evergreen/install-dependencies.sh"
4+
5+
# Install just.
6+
# On Evergreen jobs, "CI" will be set, and we don't want to write to $HOME.
7+
if [ "${CI:-}" == "true" ]; then
8+
BIN_DIR=${DRIVERS_TOOLS_BINARIES:-}
9+
else
10+
BIN_DIR=$HOME/.local/bin
11+
fi
12+
if [ ! -f $BIN_DIR/just ]; then
13+
if [ "Windows_NT" = "${OS:-}" ]; then
14+
TARGET="--target x86_64-pc-windows-msvc"
15+
else
16+
TARGET=""
17+
fi
18+
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- $TARGET --to "$BIN_DIR" || {
19+
# CARGO_HOME is defined in configure-env.sh
20+
export CARGO_HOME=${CARGO_HOME:-$HOME/.cargo/}
21+
export RUSTUP_HOME="${CARGO_HOME}/.rustup"
22+
. ${DRIVERS_TOOLS}/.evergreen/install-rust.sh
23+
cargo install just
24+
if [ "Windows_NT" = "${OS:-}" ]; then
25+
mv $CARGO_HOME/just.exe $BIN_DIR/just
26+
else
27+
mv $CARGO_HOME/just $BIN_DIR
28+
fi
29+
}
30+
fi

.evergreen/scripts/setup-dev-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ else
1717
BIN_DIR=.venv/bin
1818
fi
1919

20-
. $HERE/../install-dependencies.sh
20+
. $HERE/install-dependencies.sh
2121

2222
# Ensure there is a python venv.
2323
if [ ! -d $BIN_DIR ]; then

0 commit comments

Comments
 (0)