Skip to content

Commit

Permalink
Create minor-version symlink (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl authored Dec 16, 2024
1 parent 51505a2 commit e82393c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scripts/md2html/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,29 @@ cp -p ../../node_modules/respec/builds/respec-w3c.* ../../deploy/js/
# latest=`git describe --abbrev=0 --tags` -- introduce after release tags created
latest=1.0.0
latestCopied=none
for filename in ../../versions/[123456789].*.md ; do
lastMinor="-"
for filename in $(ls -1 ../../versions/[123456789].*.md | sort -r) ; do
version=$(basename "$filename" .md)
minorVersion=${version:0:3}
tempfile=../../deploy/arazzo/v$version-tmp.html
echo -e "\n=== v$version ==="

node md2html.js --respec --maintainers ../../MAINTAINERS.md ${filename} > $tempfile
npx respec --use-local --src $tempfile --out ../../deploy/arazzo/v$version.html
rm $tempfile

if [ $version = $latest ]; then
if [[ ${version} != *"rc"* ]];then
# version is not a Release Candidate
cp -p ../../deploy/arazzo/v$version.html ../../deploy/arazzo/latest.html
( cd ../../deploy/arazzo && ln -sf v$version.html latest.html )
latestCopied=v$version
fi
fi

if [ ${minorVersion} != ${lastMinor} ]; then
( cd ../../deploy/arazzo && ln -sf v$version.html v$minorVersion.html )
lastMinor=$minorVersion
fi
done
echo Latest tag is $latest, copied $latestCopied to latest.html

Expand Down

0 comments on commit e82393c

Please sign in to comment.