Skip to content

Commit

Permalink
upgrade: call convert-timezone script to update timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
blueowl04 committed Mar 15, 2019
1 parent c060c9f commit 80af981
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down Expand Up @@ -152,6 +155,13 @@ 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

# call convert-timezone script when upgrading from < 0.8 verions
# fixes timezone issue: https://github.com/kevinpapst/kimai2/pull/372
if `dpkg --compare-versions $old_ver "lt" "0.8"`
then
cd $final_path && sudo /usr/bin/php7.2 bin/console kimai:convert-timezone -n
fi
)
#=================================================
# NGINX CONFIGURATION
Expand Down

0 comments on commit 80af981

Please sign in to comment.