Skip to content

Commit e517822

Browse files
committed
Generate minor-version symlinks
1 parent 0dadb48 commit e517822

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
@@ -15,22 +15,32 @@ cp ../../EDITORS.md history/EDITORS_v1.0.0.md
1515
# temporarily copy installed version of respec into build directory
1616
cp -p ../../node_modules/respec/builds/respec-w3c.* ../../deploy/js/
1717

18+
# latest=`git describe --abbrev=0 --tags` -- introduce after release tags created
1819
latest=1.0.0
1920
latestCopied=none
20-
for filename in ../../versions/*.md ; do
21+
lastMinor="-"
22+
for filename in $(ls -1 ../../versions/[123456789].*.md | sort -r) ; do
2123
version=$(basename "$filename" .md)
24+
minorVersion=${version:0:3}
2225
tempfile=../../deploy/overlay/v$version-tmp.html
2326
echo -e "\n=== v$version ==="
27+
2428
node md2html.js --maintainers ./history/EDITORS_v$version.md ${filename} > $tempfile
2529
npx respec --use-local --src $tempfile --out ../../deploy/overlay/v$version.html
2630
rm $tempfile
31+
2732
if [ $version = $latest ]; then
2833
if [[ ${version} != *"rc"* ]];then
2934
# version is not a Release Candidate
30-
cp -p ../../deploy/overlay/v$version.html ../../deploy/overlay/latest.html
35+
( cd ../../deploy/overlay && ln -sf v$version.html latest.html )
3136
latestCopied=v$version
3237
fi
3338
fi
39+
40+
if [ ${minorVersion} != ${lastMinor} ]; then
41+
( cd ../../deploy/overlay && ln -sf v$version.html v$minorVersion.html )
42+
lastMinor=$minorVersion
43+
fi
3444
done
3545
echo Latest tag is $latest, copied $latestCopied to latest.html
3646

0 commit comments

Comments
 (0)