Commit fef254e4 authored by okhin's avatar okhin 🚴

Update install.sh to manage home correctly

parent 1e7224a8
Pipeline #2170 failed with stages
in 13 seconds
#!/bin/bash #!/bin/bash
# Ce script est utilisé pour paramétrer l'environnement du site # Ce script est utilisé pour paramétrer l'environnement du site
if [ -e "./app/env" ] if [ 'x$PROD_HOME' -ne 'x' ]
then then
source app/env HOME=$PROD_HOME
else
HOME=/var/www/dons/
fi fi
cd /home/don/don if [ -e "$HOME/app/env"]
then
source $HOME/app/env
fi
fi
cd $HOME
git reset --hard git reset --hard
git pull origin $CI_BUILD_REF_NAME git pull origin $CI_BUILD_REF_NAME
git checkout $CI_BUILD_REF_NAME git checkout $CI_BUILD_REF_NAME
...@@ -16,7 +24,7 @@ composer install --no-dev ...@@ -16,7 +24,7 @@ composer install --no-dev
composer update composer update
# Let's run the migrations # Let's run the migrations
if [ -e "phinx.yml" ] if [ -e "$HOME/phinx.yml" ]
then then
case $CI_BUILD_REF_NAME in case $CI_BUILD_REF_NAME in
master) master)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment