From 04aa11eb7130b9e99f3437fbee7cd8fa7568777e Mon Sep 17 00:00:00 2001 From: gagik Date: Tue, 22 Oct 2024 13:30:57 +0200 Subject: [PATCH] Move back to install-npm-deps.sh --- .evergreen/compile-artifact.sh | 10 +--------- .evergreen/install-npm-deps.sh | 7 +++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.evergreen/compile-artifact.sh b/.evergreen/compile-artifact.sh index 29c1ea484..2d3f93250 100755 --- a/.evergreen/compile-artifact.sh +++ b/.evergreen/compile-artifact.sh @@ -3,10 +3,8 @@ set -e set -x cd $(pwd) -export DISTRO_ID={$DISTRO_ID} -source .evergreen/setup-env.sh -echo "DISTRO ID IS: $DISTRO_ID" +source .evergreen/setup-env.sh # make sure our .sbom files are freshly created rm -vrf .sbom && mkdir -vp .sbom @@ -19,12 +17,6 @@ if uname -a | grep -q 'Linux.*x86_64'; then export CXX="$PWD/tmp/.sccache/sccache g++" fi -# Needed to ensure Python 3.6 support which is the oldest one that's available out-of-the-box on the rhel70 hosts. -if [[ "${DISTRO_ID}" =~ ^(rhel) ]]; then - echo "RUNNING NODE-GYP@9" - npm install node-gyp@9 --verbose --force -fi - rm -rf /tmp/m && mkdir -pv /tmp/m # Node.js compilation can fail on long path prefixes trap "rm -rf /tmp/m" EXIT export TMP=/tmp/m diff --git a/.evergreen/install-npm-deps.sh b/.evergreen/install-npm-deps.sh index bf22a74e8..5a9c80ba6 100644 --- a/.evergreen/install-npm-deps.sh +++ b/.evergreen/install-npm-deps.sh @@ -5,6 +5,13 @@ npm ci --verbose echo "MONOGDB_DRIVER_VERSION_OVERRIDE:$MONOGDB_DRIVER_VERSION_OVERRIDE" +echo "DISTRO ID: $DISTRO_ID" +# Needed to ensure Python 3.6 support which is the oldest one that's available out-of-the-box on the rhel70 hosts. +if [[ "${DISTRO_ID}" =~ ^(rhel) ]]; then + echo "RUNNING NODE-GYP@9" + npm install node-gyp@9 --verbose --force +fi + # if MONOGDB_DRIVER_VERSION_OVERRIDE is set, then we want to replace the package version if [[ -n "$MONOGDB_DRIVER_VERSION_OVERRIDE" ]]; then export REPLACE_PACKAGE="mongodb:$MONOGDB_DRIVER_VERSION_OVERRIDE"