install.sh 535 Bytes
Newer Older
1 2 3
#!/bin/bash
# Ce script est utilisé pour paramétrer l'environnement du site

4 5 6
cd /home/don/don
git pull origin $CI_BUILD_REF_NAME
git checkout $CI_BUILD_REF_NAME
7 8 9 10 11 12 13

composer install --no-dev
composer update

# Let's run the migrations
if [ -e "phinx.yml" ]
then
14 15 16 17 18 19
    case $CI_BUILD_REF_NAME in
        production)
        	php vendor/robmorgan/phinx/bin/phinx migrate -e production;;
        development)
        	php vendor/robmorgan/phinx/bin/phinx migrate -e development;;
    esac
20 21 22 23
else
	php vendor/robmorgan/phinx/bin/phinx init
fi