Skip to content

Commit 2378d52

Browse files
authored
[ admin ] fix sorting logic (#2151)
With the previous script we were sorting entries of the form html/vX.Y.Z/index.html but the order is such that vX.Y/ < vX.Y.Z/ and so we were ending up with v1.7 coming after v1.7.3. This fixes that by using sed to get rid of the html/ prefix and the /index.html suffix before the sorting phase.
1 parent eaaab4f commit 2378d52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

travis/landing.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ cat landing-top.html >> landing.html
77

88
find html/ -name "index.html" \
99
| grep -v "master\|experimental" \
10+
| sed 's|html/\([^\/]*\)/index.html|\1|g' \
1011
| sort -r \
11-
| sed 's|html/\([^\/]*\)/index.html| <li><a href="\1">\1</a></li>|g' \
12+
| sed 's|^\(.*\)$| <li><a href="\1">\1</a></li>|g' \
1213
>> landing.html
1314

1415
cat landing-bottom.html >> landing.html

0 commit comments

Comments
 (0)