Skip to content

Commit ced8b2f

Browse files
ralfhandlfrankkilcommins
authored andcommitted
chore(repo): update build.sh
1 parent bc063ad commit ced8b2f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scripts/md2html/build.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,29 @@ cp -p ../../node_modules/respec/builds/respec-w3c.* ../../deploy/js/
1616

1717
latest=`git describe --abbrev=0 --tags`
1818
latestCopied=none
19-
for filename in ../../versions/[123456789].*.md ; do
19+
lastMinor="-"
20+
for filename in $(ls -1 ../../versions/[123456789].*.md | sort -r) ; do
2021
version=$(basename "$filename" .md)
22+
minorVersion=${version:0:3}
2123
tempfile=../../deploy/arazzo/v$version-tmp.html
24+
echo -e "\n=== v$version ==="
25+
2226
node md2html.js --respec --maintainers ../../MAINTAINERS.md ${filename} > $tempfile
2327
npx respec --use-local --src $tempfile --out ../../deploy/arazzo/v$version.html
2428
rm $tempfile
29+
2530
if [ $version = $latest ]; then
2631
if [[ ${version} != *"rc"* ]];then
2732
# version is not a Release Candidate
28-
cp -p ../../deploy/arazzo/v$version.html ../../deploy/arazzo/latest.html
33+
( cd ../../deploy/arazzo && ln -sf v$version.html latest.html )
2934
latestCopied=v$version
3035
fi
3136
fi
37+
38+
if [ ${minorVersion} != ${lastMinor} ]; then
39+
( cd ../../deploy/arazzo && ln -sf v$version.html v$minorVersion.html )
40+
lastMinor=$minorVersion
41+
fi
3242
done
3343
echo Latest tag is $latest, copied $latestCopied to latest.html
3444

0 commit comments

Comments
 (0)