diff --git a/.travis.yml b/.travis.yml index 0bee6f5..f0293e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,7 @@ php: - hhvm install: - - php -r "readfile('https://getcomposer.org/installer');" | php - - php composer.phar install --prefer-source + - "./ci/_composer_install.sh" - mkdir -p build/logs - "./ci/start-ci.sh $ORIENTDB_VERSION" diff --git a/ci/_composer_install.sh b/ci/_composer_install.sh new file mode 100755 index 0000000..b24c377 --- /dev/null +++ b/ci/_composer_install.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -e + +PARENT_DIR=$(dirname $(cd "$(dirname "$0")"; pwd)) + +if [ ! -d "$PARENT_DIR/vendor/bin" ]; then + cd "${PARENT_DIR}" + php -r "readfile('https://getcomposer.org/installer');" | php + php "$PARENT_DIR/composer.phar" install --prefer-source +fi \ No newline at end of file