#!/bin/bash # Ce script est utilisé pour paramétrer l'environnement du site
cd /home/don if [ -d $CI_PROJECT_NAME ] then cd $CI_PROJECT_NAME git reset --hard git pull origin $CI_BUILD_REF_NAME git checkout $CI_BUILD_REF_NAME else git clone $CI_BUILD_REPO $CI_PROJECT_NAME cd $CI_PROJECT_NAME fi
composer install --no-dev composer update # Let's run the migrations if [ -e "phinx.yml" ] then php vendor/robmorgan/phinx/bin/phinx migrate -e production else php vendor/robmorgan/phinx/bin/phinx init fi