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 authored and hnyman committed Jan 24, 2025
1 parent 8ae0008 commit 2c7b18b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ return view.extend({
} else {
const latest = response.json().latest;

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

for (let remote_version of latest) {
let remote_branch = get_branch(remote_version);

Expand Down

0 comments on commit 2c7b18b

Please sign in to comment.