mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
copy the behavior of the old ynh_check_app_version_changed helper
This commit is contained in:
parent
2ace0741c4
commit
090cd0b13a
1 changed files with 6 additions and 7 deletions
|
@ -618,11 +618,8 @@ ynh_app_package_version () {
|
||||||
|
|
||||||
# Checks the app version to upgrade with the existing app version and returns:
|
# Checks the app version to upgrade with the existing app version and returns:
|
||||||
#
|
#
|
||||||
# - UPGRADE_APP if the upstream app version has changed
|
|
||||||
# - UPGRADE_PACKAGE if only the YunoHost package has changed
|
# - UPGRADE_PACKAGE if only the YunoHost package has changed
|
||||||
# - UPGRADE_FULL if both the upstream app version and the YunoHost package version have changed
|
# - UPGRADE_APP otherwise
|
||||||
# - UPGRADE_FORCED if the upstream app version and the current installed app version are the same but the parameter --force has been used
|
|
||||||
# - DOWNGRADE_FORCED if the upstream app version is bellow the current installed app version but the parameter --force has been used
|
|
||||||
#
|
#
|
||||||
# This helper should be used to avoid an upgrade of an app, or the upstream part
|
# This helper should be used to avoid an upgrade of an app, or the upstream part
|
||||||
# of it, when it's not needed
|
# of it, when it's not needed
|
||||||
|
@ -631,15 +628,17 @@ ynh_app_package_version () {
|
||||||
# you have to use the parameter --force (or -F).
|
# you have to use the parameter --force (or -F).
|
||||||
# example: sudo yunohost app upgrade MyApp --force
|
# example: sudo yunohost app upgrade MyApp --force
|
||||||
#
|
#
|
||||||
# Deprecated helper, use the YNH_APP_UPGRADE_TYPE variable instead.
|
|
||||||
#
|
|
||||||
# usage: ynh_check_app_version_changed
|
# usage: ynh_check_app_version_changed
|
||||||
#
|
#
|
||||||
# Requires YunoHost version 3.5.0 or higher.
|
# Requires YunoHost version 3.5.0 or higher.
|
||||||
ynh_check_app_version_changed () {
|
ynh_check_app_version_changed () {
|
||||||
ynh_print_warn --message="The helper ynh_check_app_version_changed is deprecated. Use the YNH_APP_UPGRADE_TYPE variable instead."
|
|
||||||
local return_value=${YNH_APP_UPGRADE_TYPE}
|
local return_value=${YNH_APP_UPGRADE_TYPE}
|
||||||
|
|
||||||
|
if [ "$return_value" == "UPGRADE_FULL" ] || [ "$return_value" == "UPGRADE_FORCED" ] || [ "$return_value" == "DOWNGRADE_FORCED" ]
|
||||||
|
then
|
||||||
|
return_value="UPGRADE_APP"
|
||||||
|
fi
|
||||||
|
|
||||||
echo $return_value
|
echo $return_value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue