Skip to content

Commit

Permalink
Install gyp before rest
Browse files Browse the repository at this point in the history
  • Loading branch information
gagik committed Oct 22, 2024
1 parent 04aa11e commit b083776
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .evergreen/install-npm-deps.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
set -e
set -x

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.
echo "DISTRO ID: ${DISTRO_ID}"
if [[ "${DISTRO_ID}" =~ ^(rhel) ]]; then
echo "RUNNING NODE-GYP@9"
npm install node-gyp@9 --verbose --force
export REPLACE_PACKAGE="node-gyp:9.0.0"
npm run replace-package
# force because of issues with peer deps and semver pre-releases,
# install rather than ci because `npm ci` can only install packages when your
# package.json and package-lock.json or npm-shrinkwrap.json are in sync.
# NOTE: this won't work on some more exotic platforms because not every dep
# can be installed on them. That's why we only run on linux x64 platforms when
# we set MONOGDB_DRIVER_VERSION_OVERRIDE=nightly in CI
npm ci --verbose --force
else
npm ci --verbose
fi

echo "MONOGDB_DRIVER_VERSION_OVERRIDE:$MONOGDB_DRIVER_VERSION_OVERRIDE"

# 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"
Expand Down

0 comments on commit b083776

Please sign in to comment.