Skip to content

Commit

Permalink
fix version sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
lightmare committed Aug 17, 2021
1 parent 7c91360 commit efe0191
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bin/node-build
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,16 @@ list_definitions() {
}

sort_versions() {
sed -E 'h; s/[~^<>=[:space:]]//g; s/^([[:digit:]])/a.\1/g; s/[+-]/./g; s/$/.0.0.0.0/; G; s/\n/ /' \
sed -E '
h;
s/[~^<>=[:space:]]//g;
s/^([[:digit:]])/a.\1/g;
s/_java/+20+java-/;
s/[-+]/./g;
s/$/.0.0.0.0/;
G;
s/\n/ /;
' \
| LC_ALL=C sort -t. -k 1,1 -k 2,2n -k 3,3n -k 4,4n -k 5,5n \
| cut -d' ' -f 2-
}
Expand Down

0 comments on commit efe0191

Please sign in to comment.