Skip to content

Commit

Permalink
luci-app-attendedsysupgrade: sort latest version array
Browse files Browse the repository at this point in the history
The Attended Sysupgrade app requires that the array of latest
versions be in order from newest release to oldest.  Ensure that
this is true even when upstream presents them in arbitrary order.

Signed-off-by: Eric Fahlgren <[email protected]>
  • Loading branch information
efahl committed Jan 23, 2025
1 parent 8ae0008 commit d572b28
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ return view.extend({
for (let remote_version of latest) {
let remote_branch = get_branch(remote_version);

// ensure order: newest to oldest release
latest.sort().reverse();

// already latest version installed
if (version == remote_version) {
break;
Expand Down

0 comments on commit d572b28

Please sign in to comment.