From 37d5236321ad4b24f937b274fd906a7600292fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Mon, 11 Mar 2019 15:28:09 +0100 Subject: [PATCH] upgrage: call convert-timezone script to update timezones https://github.com/kevinpapst/kimai2/pull/372 --- scripts/upgrade | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 3fd173f..e98206c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,6 +77,9 @@ ynh_install_php7 # Download, check integrity, uncompress and patch the source from app.src and do required installation for update +# version before upgrade +old_ver=`sudo yunohost app info $app --output-as plain | ynh_get_plain_key version` + #version check for 0.3 version=`cd /var/www/$app && bin/console kimai:version --short 2> /dev/null || sed -n 's/^future-release=//p' .github_changelog_generator` @@ -152,6 +155,11 @@ init_composer $final_path cd $final_path && sudo /usr/bin/php7.2 bin/console cache:clear --env=prod cd $final_path && sudo /usr/bin/php7.2 bin/console cache:warmup --env=prod cd $final_path && sudo /usr/bin/php7.2 bin/console doctrine:migrations:migrate -n + +if `dpkg --compare-versions old_ver "lt" "0.8"` +then +cd $final_path && sudo /usr/bin/php7.2 bin/console kimai:convert-timezone +fi ) #================================================= # NGINX CONFIGURATION