-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathinstall-mongodb-client-encryption.sh
More file actions
40 lines (28 loc) · 1.16 KB
/
install-mongodb-client-encryption.sh
File metadata and controls
40 lines (28 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#! /usr/bin/env bash
set -o xtrace # Write all commands first to stderr
set -o errexit # Exit the script with error if any of the commands fail
# Initial checks for running these tests
if [ -z ${PROJECT_DIRECTORY+omitted} ]; then echo "PROJECT_DIRECTORY is unset" && exit 1; fi
source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh
rm -rf mongodb-client-encryption
git clone https://github.com/mongodb-js/mongodb-client-encryption.git
pushd mongodb-client-encryption
git checkout main
node --version
npm --version
# https://github.com/nodejs/node-gyp#configuring-python-dependency
. $DRIVERS_TOOLS/.evergreen/find-python3.sh
NODE_GYP_FORCE_PYTHON=$(find_python3)
export NODE_GYP_FORCE_PYTHON
echo "NODE_GYP_FORCE_PYTHON: $NODE_GYP_FORCE_PYTHON"
if [ -n "${LIBMONGOCRYPT_VERSION}" ]; then
# nightly tests test with `latest` to test against the laster FLE build.
npm run install:libmongocrypt -- --build --libVersion $LIBMONGOCRYPT_VERSION
else
# otherwise use whatever is specified in the package.json.
npm run install:libmongocrypt
fi
echo "finished installing libmongocrypt"
popd
echo "linking mongodb-client-encrytion"
npm link ./mongodb-client-encryption