From f0ec2622a39feb685896d573ea7f28551a007da5 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 12 Nov 2024 10:59:25 +0100 Subject: [PATCH 1/2] Create symlinks for spec minor versions --- scripts/md2html/build.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/md2html/build.sh b/scripts/md2html/build.sh index 766bd94855..ec71001952 100755 --- a/scripts/md2html/build.sh +++ b/scripts/md2html/build.sh @@ -40,20 +40,29 @@ cp -p ../../node_modules/respec/builds/respec-w3c.* ../../deploy/js/ latest=`git describe --abbrev=0 --tags` latestCopied=none -for filename in ../../versions/[23456789].*.md ; do +lastMinor="-" +for filename in $(ls -1 ../../versions/[23456789].*.md | sort -r) ; do version=$(basename "$filename" .md) + minorVersion=${version:0:3} tempfile=../../deploy/oas/v$version-tmp.html echo -e "\n=== v$version ===" + node md2html.js --maintainers ./history/MAINTAINERS_v$version.md ${filename} > $tempfile npx respec --use-local --src $tempfile --out ../../deploy/oas/v$version.html rm $tempfile + if [ $version = $latest ]; then if [[ ${version} != *"rc"* ]];then # version is not a Release Candidate - cp -p ../../deploy/oas/v$version.html ../../deploy/oas/latest.html + ln -sf ../../deploy/oas/v$version.html ../../deploy/oas/latest.html latestCopied=v$version fi fi + + if [ ${minorVersion} != ${lastMinor} ] && [ ${minorVersion} != 2.0 ]; then + ln -sf ../../deploy/oas/v$version.html ../../deploy/oas/v$minorVersion-latest.html + lastMinor=$minorVersion + fi done echo Latest tag is $latest, copied $latestCopied to latest.html From 362e97455d39c95d9f0492c350ce698b9fc2852d Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 14 Nov 2024 20:39:41 +0100 Subject: [PATCH 2/2] No infix -latest --- scripts/md2html/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/md2html/build.sh b/scripts/md2html/build.sh index ec71001952..e1e421f979 100755 --- a/scripts/md2html/build.sh +++ b/scripts/md2html/build.sh @@ -60,7 +60,7 @@ for filename in $(ls -1 ../../versions/[23456789].*.md | sort -r) ; do fi if [ ${minorVersion} != ${lastMinor} ] && [ ${minorVersion} != 2.0 ]; then - ln -sf ../../deploy/oas/v$version.html ../../deploy/oas/v$minorVersion-latest.html + ln -sf ../../deploy/oas/v$version.html ../../deploy/oas/v$minorVersion.html lastMinor=$minorVersion fi done