Skip to content

Commit 99101b8

Browse files
committed
Allow customizing the driver repository for travis-ci
1 parent 7b084d3 commit 99101b8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.travis/install-extension.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ tpecl () {
1616
fi
1717
}
1818

19-
if [ "x${DRIVER_BRANCH}" != "x" ]; then
20-
echo "Compiling driver branch ${DRIVER_BRANCH}"
19+
if [ "x${DRIVER_BRANCH}" != "x" ] || [ "x${DRIVER_REPO}" != "x" ]; then
20+
CLONE_REPO=${DRIVER_REPO:-https://github.com/mongodb/mongo-php-driver}
21+
CHECKOUT_BRANCH=${DRIVER_BRANCH:-master}
22+
23+
echo "Compiling driver branch ${CHECKOUT_BRANCH} from repository ${CLONE_REPO}"
2124

2225
mkdir -p /tmp/compile
23-
git clone https://github.com/mongodb/mongo-php-driver /tmp/compile/mongo-php-driver
26+
git clone ${CLONE_REPO} /tmp/compile/mongo-php-driver
2427
cd /tmp/compile/mongo-php-driver
2528

26-
git checkout ${DRIVER_BRANCH}
29+
git checkout ${CHECKOUT_BRANCH}
2730
git submodule update --init
2831
phpize
2932
./configure --enable-mongodb-developer-flags

0 commit comments

Comments
 (0)