Przeglądaj źródła

Fix issue in upgrade script when version > 1.x.10 (#2074)

* Fix issue with sorting versions correctly

Use sort -v instead of default sorting

* Update Changelog
Jaap Marcus 4 lat temu
rodzic
commit
6019c3944e
2 zmienionych plików z 4 dodań i 2 usunięć
  1. 1 0
      CHANGELOG.md
  2. 3 2
      func/upgrade.sh

+ 1 - 0
CHANGELOG.md

@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
 ### Bugfixes
 
 - Improve handling upgrade of Roundcube #1917
+- Fix an issue with sorting the update scripts when version goes higher then 1.x.10 
 
 ## [1.4.10] - Service release 
 

+ 3 - 2
func/upgrade.sh

@@ -438,8 +438,9 @@ upgrade_start_routine() {
     done
 
     # Define variables for accessing supported versions
-    all_versions=$(printf "%s\n" ${available_versions[@]})
-    oldest_version=$(printf "%s\n" ${available_versions[@]} | sort -r | tail -n1)
+    # Sort version by -V due to issues with version numbers 1.4.10 and higher 
+    all_versions=$(printf "%s\n" ${available_versions[@]} | sort -V)
+    oldest_version=$(printf "%s\n" ${available_versions[@]} | head -n1)
     latest_version=$(printf "%s\n" ${available_versions[@]} | tail -n1)
 
     # Check for supported versions and process necessary upgrade steps