#!/bin/sh

case $1 in
dontpull)
  ;;
*)
  echo '0a) git pull'
  git pull
  ;;
esac

echo '1) composer install'
php composer.phar install

echo '2) test prepare'
sh ./test_prepare.sh

echo '3) cache: clear and warmup'
rm -rf app/cache/*
php app/console cache:clear --env=test
php app/console cache:clear --env=prod

echo '4) run functional tests'
sh test_functional.sh
