Skip to contentSkip to conversation

scripts/run-docs-build: add 'current' link when deploying docs

PATCH New Nicolas Dechesne 1 participant 1 message May 18, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/run-docs-build: add 'current' link when deploying docs

Make sure that https://docs.yoctoproject.org/current will always link to the most recent release documentation.

---
 scripts/run-docs-build | 4 ++++
 1 file changed, 4 insertions(+)
scripts/run-docs-build +4 -0
index 52bd567..b2828e3 100755
@@ -92,6 +92,10 @@ for tag in $(git tag --list 'yocto-*'); do
     fi
 done
 
+# get current release (e.g. most recent tag), and add a 'current' link
+tag=$(git tag --list 'yocto-*' | sort --version-sort | tail -1 | cut -c7-)
+ln -s $tag $outputdir/current
+
 # Update switchers.js with the copy from master ypdocs
 cd $outputdir
 find . -name switchers.js -not -path ./_static/switchers.js -exec cp ./_static/switchers.js {} \;
Signature · 1 line
2.31.1