Skip to content

Commit

Permalink
fix: wrong version order
Browse files Browse the repository at this point in the history
versions should be sorted as alpha < beta < RC < release(no suffix) < pl
  • Loading branch information
susurri committed Feb 1, 2022
1 parent 892c9bc commit 1a2085a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/list-all
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eo pipefail

sort_versions() {
sed 'h; s/[+-]/./g; s/.p\([[:digit:]]\)/.z\1/; s/$/.z/; G; s/\n/ /' |
sed 'h; s/[+-]/./g; s/^\([[:digit:]]\.[[:digit:]]\)\([bR]\)/\1.0\2/; s/.p\([[:digit:]]\)/.z\1/; s/$/.z/; s/R/.r/; s/alpha/.alpha/; s/b/.b/; s/dev/.dev/; s/pre/.pre/; G; s/\n/ /' |
LC_ALL=C sort -t. -k 1,1 -k 2,2n -k 3,3n -k 4,4n -k 5,5n | awk '{print $2}'
}

Expand Down

0 comments on commit 1a2085a

Please sign in to comment.