Browse Source

Fix upgrade for first major versions

pull/311/head
Jimmy Monin 6 years ago
parent
commit
ad4ea9d6e7
  1. 10
      scripts/upgrade

10
scripts/upgrade

@ -247,17 +247,19 @@ then
major_version=${last_version%%.*}
current_major_version=${current_version%%.*}
# Load the value for this version
source upgrade.d/upgrade.$current_major_version.sh
# If the current version has the same major version than the next one,
# then it's the last upgrade to do
if [ "$major_version" -eq "$current_major_version" ]; then
# We also cover the case where the last version is the first of the current major version series
# (e.g. 19.0.0 is the latest version)
if [[ ("$major_version" -eq "$current_major_version") || ( ("$major_version" -eq "$((current_major_version+1))") && ("$next_version" == "$last_version") ) ]]; then
current_major_version=last
# Execute the commands dedicated to the last upgrade
last_upgrade_operations
fi
# Load the value for this version
source upgrade.d/upgrade.$current_major_version.sh
ynh_print_info --message="Upgrade to nextcloud $next_version"
# Create an app.src for this version of nextcloud

Loading…
Cancel
Save