From 0ae3e4fe08a8f50a52362586a224e90b946080d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Sat, 11 Feb 2017 01:24:28 +0100 Subject: [PATCH] FEATURE: improve little bit update script --- scripts/update.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/update.sh b/scripts/update.sh index 36f63441..7ece85d0 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -31,6 +31,14 @@ if [ ! $? -eq 0 ]; then fi git checkout $BRANCH + +if [ ! $? -eq 0 ]; then + echo " *****************************************" + echo " * ERROR: cannot do git checkout $BRANCH *" + echo " *****************************************" + exit 2 +fi + git pull origin $BRANCH if [ ! $? -eq 0 ]; then @@ -40,14 +48,18 @@ if [ ! $? -eq 0 ]; then exit 2 fi +set -e composer install --no-dev +npm install +bower install php artisan migrate --force -n php artisan module:migrate --force -n -php artisan vendor:publish --tag=module-views --force -n -php artisan vendor:publish --tag=public-assets --force -n php artisan vendor:publish +php artisan template:publish +php artisan clear-compiled php artisan view:clear +php artisan optimize # this part need running as root sudo chmod 0777 bootstrap/cache -R @@ -59,8 +71,7 @@ sudo chmod 0777 modules/*/module.json sudo chmod 0777 modules/*/*/module.json sudo chmod +x scripts/* -npm install - gulp --production -php artisan up \ No newline at end of file +php artisan up +set +e \ No newline at end of file