Skip to content

Commit 6019c39

Browse files
authored
Fix issue in upgrade script when version > 1.x.10 (hestiacp#2074)
* Fix issue with sorting versions correctly Use sort -v instead of default sorting * Update Changelog
1 parent 05d0a7c commit 6019c39

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
1111
### Bugfixes
1212

1313
- Improve handling upgrade of Roundcube #1917
14+
- Fix an issue with sorting the update scripts when version goes higher then 1.x.10
1415

1516
## [1.4.10] - Service release
1617

func/upgrade.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,9 @@ upgrade_start_routine() {
438438
done
439439

440440
# Define variables for accessing supported versions
441-
all_versions=$(printf "%s\n" ${available_versions[@]})
442-
oldest_version=$(printf "%s\n" ${available_versions[@]} | sort -r | tail -n1)
441+
# Sort version by -V due to issues with version numbers 1.4.10 and higher
442+
all_versions=$(printf "%s\n" ${available_versions[@]} | sort -V)
443+
oldest_version=$(printf "%s\n" ${available_versions[@]} | head -n1)
443444
latest_version=$(printf "%s\n" ${available_versions[@]} | tail -n1)
444445

445446
# Check for supported versions and process necessary upgrade steps

0 commit comments

Comments
 (0)