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

4
5
6
7
8
9
10
11
12
13
14
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
15
16
17
18
19
20
21
22
23
24
25
26

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