2016-04-27 16:59:05 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
pull_if_exists() {
|
|
|
|
if [ -d $1 ]; then
|
|
|
|
pushd $1
|
|
|
|
git pull
|
|
|
|
popd
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
git pull
|
|
|
|
|
2016-06-02 12:16:03 +02:00
|
|
|
php composer.phar update -o
|
|
|
|
|
2016-04-27 16:59:05 +02:00
|
|
|
pull_if_exists module/MonarcCore
|
|
|
|
pull_if_exists module/MonarcBO
|
2016-08-25 15:42:05 +02:00
|
|
|
pull_if_exists module/MonarcFO
|
2016-04-27 16:59:05 +02:00
|
|
|
pull_if_exists node_modules/ng_backoffice
|
2016-08-25 15:42:05 +02:00
|
|
|
pull_if_exists node_modules/ng_client
|
2016-08-30 09:56:24 +02:00
|
|
|
pull_if_exists node_modules/ng_anr
|
2016-04-27 16:59:05 +02:00
|
|
|
|
2016-09-08 10:16:19 +02:00
|
|
|
if [ -d module/MonarcCore/hooks ]; then
|
|
|
|
cd module/MonarcCore/.git/hooks
|
|
|
|
ln -s ../../hooks/pre-commit.sh pre-commit 2>/dev/null
|
|
|
|
chmod u+x pre-commit
|
|
|
|
cd ../../../../
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2016-06-02 12:16:03 +02:00
|
|
|
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcCore/migrations/phinx.php
|
2016-08-25 15:42:05 +02:00
|
|
|
|
|
|
|
if [ -d module/MonarcBO ]; then
|
|
|
|
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcBO/migrations/phinx.php
|
2016-09-08 10:16:19 +02:00
|
|
|
|
|
|
|
if [ -d module/MonarcBO/hooks ]; then
|
|
|
|
cd module/MonarcBO/.git/hooks
|
|
|
|
ln -s ../../hooks/pre-commit.sh pre-commit 2>/dev/null
|
|
|
|
chmod u+x pre-commit
|
|
|
|
cd ../../../../
|
|
|
|
fi
|
2016-08-25 15:42:05 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d module/MonarcFO ]; then
|
|
|
|
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcFO/migrations/phinx.php
|
2016-09-08 10:16:19 +02:00
|
|
|
|
|
|
|
if [ -d module/MonarcFO/hooks ]; then
|
|
|
|
cd module/MonarcFO/.git/hooks
|
|
|
|
ln -s ../../hooks/pre-commit.sh pre-commit 2>/dev/null
|
|
|
|
chmod u+x pre-commit
|
|
|
|
cd ../../../../
|
|
|
|
fi
|
2016-08-25 15:42:05 +02:00
|
|
|
fi
|
2016-06-02 12:16:03 +02:00
|
|
|
|
2016-04-27 16:59:05 +02:00
|
|
|
if [ -d node_modules/ng_backoffice ]; then
|
|
|
|
cd node_modules/ng_backoffice
|
|
|
|
npm install
|
|
|
|
cd ../..
|
|
|
|
fi
|
|
|
|
|
2016-08-25 15:42:05 +02:00
|
|
|
if [ -d node_modules/ng_client ]; then
|
|
|
|
cd node_modules/ng_client
|
|
|
|
npm install
|
|
|
|
cd ../..
|
|
|
|
fi
|
|
|
|
|
2016-04-27 16:59:05 +02:00
|
|
|
./scripts/link_modules_resources.sh
|
2016-06-28 10:02:53 +02:00
|
|
|
./scripts/compile_translations.sh
|
2016-11-07 14:16:58 +01:00
|
|
|
|
|
|
|
# Clear doctrine cache
|
|
|
|
php ./public/index.php orm:clear-cache:metadata
|
|
|
|
php ./public/index.php orm:clear-cache:query
|
|
|
|
php ./public/index.php orm:clear-cache:result
|
|
|
|
|
2017-01-06 16:56:29 +01:00
|
|
|
# Clear ZF2 cache
|
|
|
|
touch ./data/cache/upgrade && chmod 777 ./data/cache/upgrade
|