EVO: script client-upgrade-db > check good path between "module/" & "vendor/monarc/"

pull/1/head
Thomas Metois 2017-03-17 11:39:47 +01:00
parent ae9ec6a59e
commit 0c3a6b5377
1 changed files with 28 additions and 2 deletions

View File

@ -9,12 +9,38 @@ SQLUSER=$3
SQLPASS=$4
SQLBASE=$5
path=""
case $MODULE in
"MonarcCore"|"core")
path="module/MonarcCore"
if [ ! -d $pathCore ]; then
path="vendor/monarc/core"
fi
;;
"MonarcFO"|"frontoffice")
path="module/MonarcFO"
if [ ! -d $pathCore ]; then
path="vendor/monarc/frontoffice"
fi
;;
"MonarcBO"|"backoffice")
path="module/MonarcBO"
if [ ! -d $pathCore ]; then
path="vendor/monarc/backoffice"
fi
;;
*)
echo "Unknow module"
exit 1
;;
esac
cat <<EOF >/tmp/conf.tmp.php
<?php
return array(
'paths' => array(
'migrations' => 'vendor/monarc/$MODULE/migrations/db',
'seeds' => 'vendor/monarc/$MODULE/migrations/seeds',
'migrations' => '$path/migrations/db',
'seeds' => '$path/migrations/seeds',
),
'environments' => array(
'default_migration_table' => 'phinxlog',