1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hextris_ynh.git synced 2024-09-03 19:16:05 +02:00

Update upgrade

This commit is contained in:
Aeris One 2020-03-30 19:13:21 +02:00 committed by GitHub
parent de22d8ed0e
commit 6ca812d7e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,12 +23,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
### This helper will compare the version of the currently installed app and the version of the upstream package.
### $upgrade_type can have 2 different values
### - UPGRADE_APP if the upstream app version has changed
### - UPGRADE_PACKAGE if only the YunoHost package has changed
### ynh_check_app_version_changed will stop the upgrade if the app is up to date.
### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do.
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
@ -47,18 +41,8 @@ fi
### MIGRATE FROM LEGACY PERMISSION SYSTEM ### MIGRATE FROM LEGACY PERMISSION SYSTEM
### ###
# Remove skipped_uris if exists
# /!\ This commands also remove the "main" permission from "visitor" groups.
ynh_app_setting_delete --app=$app --key=skipped_uris
# Remove unprotected_uris if exists
ynh_app_setting_delete --app=$app --key=unprotected_uris
# Remove protected_uris if exists
ynh_app_setting_delete --app=$app --key=protected_uris
# Remove is_public if exists and trick about what I said 8 lines before.
if [ -n "$is_public" ]; then if [ -n "$is_public" ]; then
ynh_app_setting_delete --app=$app --key=skipped_uris
if [ $is_public -eq 1 ]; then if [ $is_public -eq 1 ]; then
ynh_permission_update --permission "main" --add "visitors" ynh_permission_update --permission "main" --add "visitors"
fi fi
@ -66,7 +50,6 @@ if [ -n "$is_public" ]; then
fi fi
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================