From: Quentin Schulz <[email protected]>

Since the latest tag already has a specific handling in the forloop,
let's just move the symlink creation inside the forloop.

Cc: Quentin Schulz <[email protected]>
Signed-off-by: Quentin Schulz <[email protected]>
---
 scripts/run-docs-build | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index faba0fe..ecc5332 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -142,6 +142,8 @@ for branch in dunfell $(git branch --remote --contains 
"$first_sphinx_commit" --
         branch=""
         mkdir $outputdir/$latest_tag
         cp -r ./_build/final/* $outputdir/$latest_tag
+        echo Linking to $latest_tag as current
+        ln -s $latest_tag $outputdir/current
     elif [ "$branch" = "transition" ]; then
         branch=""
     else
@@ -153,11 +155,6 @@ for branch in dunfell $(git branch --remote --contains 
"$first_sphinx_commit" --
     git clean -f
 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-)
-echo Linking to $tag as current
-ln -s $tag $outputdir/current
-
 # Update bitbake switchers.js with the copy from master ypdocs
 cd $outputdir/bitbake
 find . -name switchers.js -exec cp $outputdir/current/_static/switchers.js {} 
\;
-- 
2.35.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#56812): https://lists.yoctoproject.org/g/yocto/message/56812
Mute This Topic: https://lists.yoctoproject.org/mt/90566470/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to