From 24d70779c60bfd7b3699f3d94351bb84c044f1ab Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Fri, 20 Sep 2024 15:31:33 -0400 Subject: [PATCH] chore: use drivers-tools init-env script --- .evergreen/init-node-and-npm-env.sh | 21 --------------------- .evergreen/run-prebuild.sh | 2 +- .evergreen/run-tests.sh | 2 +- 3 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 .evergreen/init-node-and-npm-env.sh diff --git a/.evergreen/init-node-and-npm-env.sh b/.evergreen/init-node-and-npm-env.sh deleted file mode 100644 index b3cecf54..00000000 --- a/.evergreen/init-node-and-npm-env.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /usr/bin/env bash -## -## This script add the location of `npm` and `node` to the path. -## This is necessary because evergreen uses separate bash scripts for -## different functions in a given CI run but doesn't persist the environment -## across them. So we manually invoke this script everywhere we need -## access to `npm`, `node`, or need to install something globally from -## npm. - -NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts" -if [[ "$OS" == "Windows_NT" ]]; then - NODE_ARTIFACTS_PATH=$(cygpath --unix "$NODE_ARTIFACTS_PATH") -fi - -export NODE_ARTIFACTS_PATH -# npm uses this environment variable to determine where to install global packages -export npm_global_prefix=$NODE_ARTIFACTS_PATH/npm_global -export PATH="$npm_global_prefix/bin:$NODE_ARTIFACTS_PATH/nodejs/bin:$PATH" -hash -r - -export NODE_OPTIONS="--trace-deprecation --trace-warnings" diff --git a/.evergreen/run-prebuild.sh b/.evergreen/run-prebuild.sh index c9330fa5..d01e357f 100755 --- a/.evergreen/run-prebuild.sh +++ b/.evergreen/run-prebuild.sh @@ -3,7 +3,7 @@ set -o errexit # Exit the script with error if any of the commands fail set -o xtrace -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source ./.drivers-tools/.evergreen/init-node-and-npm-env.sh # mongodbtoolchain is necessary for building on Windows export PATH="/opt/mongodbtoolchain/v2/bin:$PATH" diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 4c85e65f..76e748da 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -3,7 +3,7 @@ set -o errexit # Exit the script with error if any of the commands fail set -o xtrace -source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh" +source ./.drivers-tools/.evergreen/init-node-and-npm-env.sh npm run check:lint npm test