Skip to content

Commit e44e98b

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

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

.evergreen/run-tests.sh

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,30 @@ 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+
set_extension_version () {
21+
case $1 in
22+
'4.4')
23+
export DRIVER_VERSION='1.8.2'
24+
;;
25+
'4.2')
26+
export DRIVER_VERSION='1.6.1'
27+
;;
28+
'4.0')
29+
export DRIVER_VERSION='1.5.5'
30+
;;
31+
esac
32+
}
33+
34+
set_extension_version "${DRIVER_MONGODB_VERSION}"
35+
36+
echo $DRIVER_VERSION
37+
38+
DIR=$(dirname $0)
39+
. $DIR/install-dependencies.sh
2340
fi
2441

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

0 commit comments

Comments
 (0)