From 4ac780eb21f1cceeca34e698e6865d49ec7d3ee8 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 3 Oct 2016 14:33:05 +0200 Subject: [PATCH] Use install_dev.sh for Travis Add `--no-dev` to `composer install` for prod env --- .travis.yml | 4 ++-- install.sh | 24 +++++++++++------------- install_dev.sh | 17 +++++++++-------- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index c5fe7b01..b0b26b56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,8 +91,8 @@ before_install: - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; script: - - travis_wait bash install.sh + - travis_wait bash install_dev.sh - ant prepare-$DB - - phpunit -v + - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then phpunit -v ; fi; - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; diff --git a/install.sh b/install.sh index 29b343b2..87d53bf0 100755 --- a/install.sh +++ b/install.sh @@ -1,15 +1,13 @@ #! /usr/bin/env bash -if [[ $ASSETS == 'build' ]]; then - echo "Installing PHP dependencies through Composer..." - composer install --no-interaction --no-progress --prefer-dist -o - - chmod ugo+x vendor/mouf/nodejs-installer/bin/local/npm - echo "Downloading librairies through npm..." - vendor/mouf/nodejs-installer/bin/local/npm install - - echo "Concat, minify and installing assets..." - node_modules/grunt/bin/grunt -else - composer install --no-interaction --no-progress --prefer-dist -o -fi +echo " > Installing PHP dependencies through Composer..." +composer install --no-interaction --no-progress --prefer-dist -o --no-dev + +chmod ugo+x vendor/mouf/nodejs-installer/bin/local/npm +echo " > Downloading librairies through npm..." +vendor/mouf/nodejs-installer/bin/local/npm install + +echo " > Concat, minify and installing assets..." +node_modules/grunt/bin/grunt + +echo " > Install finished" diff --git a/install_dev.sh b/install_dev.sh index 61a4f6fd..cbd47495 100755 --- a/install_dev.sh +++ b/install_dev.sh @@ -1,13 +1,14 @@ #! /usr/bin/env bash -echo "Installing PHP dependencies (including dev) through Composer..." -composer install +echo " > Installing PHP dependencies (including dev) through Composer..." +composer install -o --no-interaction --no-progress --prefer-dist -echo "Downloading librairies through npm..." -npm install +if [[ $ASSETS == 'build' || $TRAVIS_BUILD_DIR == '' ]]; then + echo " > Downloading librairies through npm..." + npm install -echo "Concat, minify and installing assets..." -grunt + echo " > Concat, minify and installing assets..." + grunt +fi -echo "Installing wallabag..." -php bin/console wallabag:install +echo " > Install finished" -- 2.41.0