[yocto-autobuilder-helper] [PATCH] scripts/run-docs-build: Use set-versions.py to get the latest release branch name


Richard Purdie
 

The intent here is to use the latest release branch name instead of a tagged version.
For the 4.0 case, this means the full migration guide will be shown instead of
the reduced information in the 4.0 tag.

Signed-off-by: Richard Purdie <richard.purdie@...>
---
scripts/run-docs-build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index ecc5332..f6b8ac4 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -92,7 +92,11 @@ cd $ypdocs
first_sphinx_commit=01dd5af7954e24552aca022917669b27bb0541ed
first_dunfell_sphinx_commit=c25fe058b88b893b0d146f3ed27320b47cdec236

-latest_tag=$(git tag --contains "$first_sphinx_commit" --contains "$first_dunfell_sphinx_commit" --sort="version:refname" 'yocto-*' | tail -1 | sed 's/yocto-//')
+git checkout set_versions.py
+#latest_tag=$(git tag --contains "$first_sphinx_commit" --contains "$first_dunfell_sphinx_commit" --sort="version:refname" 'yocto-*' | tail -1 | sed 's/yocto-//')
+latest_tag=$(./set_versions.py getlatest)
+git reset --hard
+git clean -f

for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" --format '%(refname:lstrip=3)') $(git tag --contains "$first_sphinx_commit" --contains "$first_dunfell_sphinx_commit" 'yocto-*') transition; do
if [ "$branch" = "HEAD" ]; then
--
2.32.0