Skip to content

Commit

Permalink
[Travis] Fix bash conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
GeLoLabs committed Feb 7, 2017
1 parent 6e82c3f commit 9d19fe2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker/hhvm/entrypoint.sh
Expand Up @@ -7,7 +7,7 @@ USER_ID=${USER_ID-1000}
XDEBUG=${XDEBUG-0}

# Enable XDebug
if [ ${XDEBUG} = 1 ]; then
if [ "$XDEBUG" = 1 ]; then
cat /var/www/xdebug.ini >> /etc/hhvm/php.ini
fi

Expand Down
2 changes: 1 addition & 1 deletion docker/php/entrypoint.sh
Expand Up @@ -7,7 +7,7 @@ USER_ID=${USER_ID-1000}
XDEBUG=${XDEBUG-0}

# Disable XDebug
if [ ! ${XDEBUG} = 1 ]; then
if [ ! "$XDEBUG" = 1 ]; then
rm -f /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
fi

Expand Down
4 changes: 2 additions & 2 deletions travis/install.sh
Expand Up @@ -6,7 +6,7 @@ SYMFONY_VERSION=${SYMFONY_VERSION-2.3.*}
COMPOSER_PREFER_LOWEST=${COMPOSER_PREFER_LOWEST-false}
DOCKER_BUILD=${DOCKER_BUILD=false}

if [ ${DOCKER_BUILD} = true ]; then
if [ "$DOCKER_BUILD" = true ]; then
cp .env.dist .env

docker-compose build
Expand Down Expand Up @@ -35,4 +35,4 @@ if [[ "$SYMFONY_VERSION" = *dev* ]]; then
sed -i "s/\"MIT\"/\"MIT\",\"minimum-stability\":\"dev\"/g" composer.json
fi

composer update --prefer-source `if [[ ${COMPOSER_PREFER_LOWEST} = true ]]; then echo "--prefer-lowest --prefer-stable"; fi`
composer update --prefer-source `if [ "$COMPOSER_PREFER_LOWEST" = true ]; then echo "--prefer-lowest --prefer-stable"; fi`
4 changes: 2 additions & 2 deletions travis/script.sh
Expand Up @@ -4,11 +4,11 @@ set -e

DOCKER_BUILD=${DOCKER_BUILD=false}

if [ ${DOCKER_BUILD} = false ]; then
if [ "$DOCKER_BUILD" = false ]; then
vendor/bin/phpunit --coverage-clover build/clover.xml
fi

if [ ${DOCKER_BUILD} = true ]; then
if [ "$DOCKER_BUILD" = true ]; then
docker-compose run --rm php vendor/bin/phpunit
docker-compose run --rm hhvm vendor/bin/phpunit
fi
2 changes: 1 addition & 1 deletion travis/success.sh
Expand Up @@ -4,7 +4,7 @@ set -e

DOCKER_BUILD=${DOCKER_BUILD=false}

if [ ${DOCKER_BUILD} = false ]; then
if [ "$DOCKER_BUILD" = false ]; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover build/clover.xml
fi

0 comments on commit 9d19fe2

Please sign in to comment.