mirror of
https://github.com/YunoHost-Apps/weblate_ynh.git
synced 2024-10-01 13:35:04 +02:00
correct checksum and use virtualenv in upgrade
This commit is contained in:
parent
2877935fd6
commit
5bc192cc1f
2 changed files with 10 additions and 4 deletions
|
@ -191,7 +191,7 @@ ynh_replace_string "__FINALPATH__" "$final_path/" /etc/cron.d/$app
|
|||
#=================================================
|
||||
|
||||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum "$final_path/CONFIG_FILE"
|
||||
ynh_store_file_checksum "$final_path/venv/lib/python2.7/site-packages/weblate/settings.py"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -76,12 +76,18 @@ ynh_system_user_create $app
|
|||
# Migrate databases
|
||||
#=================================================
|
||||
|
||||
cd "$final_path" && python3 ./manage.py migrate
|
||||
(
|
||||
set +eu
|
||||
source ${final_path}/venv/bin/activate
|
||||
export DJANGO_SETTINGS_MODULE="weblate.settings"
|
||||
cd ${final_path}
|
||||
weblate migrate --noinput
|
||||
)
|
||||
|
||||
# Verify the checksum and backup the file if it's different
|
||||
ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE"
|
||||
ynh_backup_if_checksum_is_different "$final_path/venv/lib/python2.7/site-packages/weblate/settings.py"
|
||||
# Recalculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum "$final_path/CONFIG_FILE"
|
||||
ynh_store_file_checksum "$final_path/venv/lib/python2.7/site-packages/weblate/settings.py"
|
||||
|
||||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
|
|
Loading…
Reference in a new issue