Skip to content

Commit

Permalink
Try random things
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Nov 8, 2017
1 parent 5554b88 commit af37a19
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
23 changes: 9 additions & 14 deletions .travis/before_install_test.sh
@@ -1,23 +1,18 @@
#!/usr/bin/env sh
set -ev

PHP_INI_DIR="$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/"
TRAVIS_INI_FILE="$PHP_INI_DIR/travis.ini"
if [ "$DOCTRINE_ODM" != "" ]
then
composer require "doctrine/mongodb-odm:$DOCTRINE_ODM" --no-update
echo "extension=mongodb.so" >> "$TRAVIS_INI_FILE"
fi

if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ]; then
PHP_INI_DIR="$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/"
TRAVIS_INI_FILE="$PHP_INI_DIR/travis.ini"
echo "memory_limit=3072M" >> "$TRAVIS_INI_FILE"


if [ "$TRAVIS_PHP_VERSION" '<' '7.0' ]; then
echo "extension=mongo.so" >> "$TRAVIS_INI_FILE"
else
echo "extension=mongodb.so" >> "$TRAVIS_INI_FILE"

# Backwards compatibility with old mongo extension
composer require "alcaeus/mongo-php-adapter" --no-update
fi
fi
fi

sed --in-place "s/\"dev-master\":/\"dev-${TRAVIS_COMMIT}\":/" composer.json

if [ "$SYMFONY" != "" ]; then composer require "symfony/symfony:$SYMFONY" --no-update; fi;
if [ "$DOCTRINE_ODM" != "" ]; then composer require "doctrine/mongodb-odm:$DOCTRINE_ODM" --no-update; fi;
13 changes: 7 additions & 6 deletions .travis/install_test.sh
Expand Up @@ -4,12 +4,7 @@ set -ev
mkdir --parents "${HOME}/bin"

# PHPUnit install
if [ ${TRAVIS_PHP_VERSION} '<' '5.6' ]; then
PHPUNIT_PHAR=phpunit-4.8.phar
else
PHPUNIT_PHAR=phpunit-5.7.phar
fi
wget "https://phar.phpunit.de/${PHPUNIT_PHAR}" --output-document="${HOME}/bin/phpunit"
wget "https://phar.phpunit.de/phpunit-5.7.phar" --output-document="${HOME}/bin/phpunit"
chmod u+x "${HOME}/bin/phpunit"

# Coveralls client install
Expand All @@ -23,4 +18,10 @@ if [ "${COMPOSER_FLAGS}" = '--prefer-lowest' ]; then
composer update --prefer-dist --no-interaction --prefer-stable --quiet --ignore-platform-reqs
fi

if [ "$DOCTRINE_ODM" != "" ]
then
echo "$DOCTRINE_ODM"
# Backwards compatibility with old mongo extension
composer require "alcaeus/mongo-php-adapter" --ignore-platform-reqs
fi
composer update --prefer-dist --no-interaction --prefer-stable ${COMPOSER_FLAGS}

0 comments on commit af37a19

Please sign in to comment.