Skip to content

Commit 155c65c

Browse files
committed
Move some version shenanigans to drivers-matrix-testing
1 parent 9830552 commit 155c65c

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

.evergreen/run-tests.sh

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,31 @@ AUTH=${AUTH:-noauth}
1313
SSL=${SSL:-nossl}
1414
MONGODB_URI=${MONGODB_URI:-}
1515
TESTS=${TESTS:-}
16-
PHP_VERSION=${PHP_VERSION:-7.2.21}
17-
18-
# The PLATFORM environment variable is used by the matrix testing project.
19-
# For the time being, we can use that to install the correct extension version
20-
if [ "x${PLATFORM}" != "x" ]; then
21-
DIR=$(dirname $0)
22-
DRIVER_VERSION=1.5.5 . $DIR/install-dependencies.sh
16+
PHP_IS_MATRIX_TESTING=${PHP_IS_MATRIX_TESTING:-false}
17+
18+
# For matrix testing, we have to determine the correct driver version
19+
if [ "$PHP_IS_MATRIX_TESTING" == "true" ]; then
20+
echo ${DRIVER_MONGODB_VERSION}
21+
set_extension_version () {
22+
case \\$1 in
23+
'4.4')
24+
export DRIVER_VERSION='1.8.2'
25+
;;
26+
'4.2')
27+
export DRIVER_VERSION='1.6.1'
28+
;;
29+
'4.0')
30+
export DRIVER_VERSION='1.5.5'
31+
;;
32+
esac
33+
}
34+
35+
set_extension_version "${DRIVER_MONGODB_VERSION}"
36+
37+
echo $DRIVER_VERSION
38+
39+
DIR=$(dirname $0)
40+
. $DIR/install-dependencies.sh
2341
fi
2442

2543
OS=$(uname -s | tr '[:upper:]' '[:lower:]')

0 commit comments

Comments
 (0)