EVO: update-all.sh > test if module dir exist else use vendor for update monarc modules

pull/1/head
Thomas Metois 2017-03-01 09:14:00 +01:00 committed by Guillaume Lesniak
parent e5673fa600
commit 5e31b15fbc
1 changed files with 41 additions and 24 deletions

View File

@ -13,42 +13,59 @@ git pull
php composer.phar update -o php composer.phar update -o
pull_if_exists module/MonarcCore currentPath=`pwd`
pull_if_exists module/MonarcBO pathCore="module/MonarcCore"
pull_if_exists module/MonarcFO if [ -d $pathCore ]; then
pull_if_exists $pathCore
else
pathCore="vendor/monarc/core"
fi
pathBO="module/MonarcBO"
if [ -d $pathBO ]; then
pull_if_exists $pathBO
else
pathBO="vendor/monarc/backoffice"
fi
pathFO="module/MonarcFO"
if [ -d $pathFO ]; then
pull_if_exists $pathFO
else
pathFO="vendor/monarc/frontoffice"
fi
pull_if_exists node_modules/ng_backoffice pull_if_exists node_modules/ng_backoffice
pull_if_exists node_modules/ng_client pull_if_exists node_modules/ng_client
pull_if_exists node_modules/ng_anr pull_if_exists node_modules/ng_anr
if [ -d module/MonarcCore/hooks ]; then if [ -d $pathCore ]; then
cd module/MonarcCore/.git/hooks php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./$pathCore/migrations/phinx.php
ln -s ../../hooks/pre-commit.sh pre-commit 2>/dev/null if [ -d "${pathCore}/hooks" ]; then
chmod u+x pre-commit cd $pathCore/.git/hooks
cd ../../../../
fi
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcCore/migrations/phinx.php
if [ -d module/MonarcBO ]; then
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcBO/migrations/phinx.php
if [ -d module/MonarcBO/hooks ]; then
cd module/MonarcBO/.git/hooks
ln -s ../../hooks/pre-commit.sh pre-commit 2>/dev/null ln -s ../../hooks/pre-commit.sh pre-commit 2>/dev/null
chmod u+x pre-commit chmod u+x pre-commit
cd ../../../../ cd $currentPath
fi fi
fi fi
if [ -d module/MonarcFO ]; then if [ -d $pathBO ]; then
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcFO/migrations/phinx.php php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./$pathBO/migrations/phinx.php
if [ -d module/MonarcFO/hooks ]; then if [ -d "${pathBO}/hooks" ]; then
cd module/MonarcFO/.git/hooks cd $pathBO/.git/hooks
ln -s ../../hooks/pre-commit.sh pre-commit 2>/dev/null ln -s ../../hooks/pre-commit.sh pre-commit 2>/dev/null
chmod u+x pre-commit chmod u+x pre-commit
cd ../../../../ cd $currentPath
fi
fi
if [ -d $pathFO ]; then
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./$pathFO/migrations/phinx.php
if [ -d "$pathFO/hooks" ]; then
cd $pathFO/.git/hooks
ln -s ../../hooks/pre-commit.sh pre-commit 2>/dev/null
chmod u+x pre-commit
cd $currentPath
fi fi
fi fi