diff mbox series

[yocto-autobuilder-helper,1/2] scripts/run-docs-build: build using generated releases.json

Message ID 20260304-docs-gen-releases-json-v1-1-174049cbef87@bootlin.com
State New
Headers show
Series scripts/run-docs-build: build using generated releases.json | expand

Commit Message

Antonin Godard March 4, 2026, 8:40 a.m. UTC
Generate the releases.json file using the release-parser.py script, and
copy this file to the documentation/ directory for each yocto-docs
build. It is then picked up by set_versions.py to determine the list of
currently active releases.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 scripts/run-docs-build | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index 97c5d7a..b75799e 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -97,6 +97,10 @@  tar --exclude=eclipse -xJf ${docbookarchive_localpath}
 
 $scriptdir/docs_add_banner.py
 
+# generate the releases.json in PWD
+$scriptdir/release-parser.py $ypdocs/..
+cp releases.json "$builddir"
+
 cd $bbdocs
 mkdir $outputdir/bitbake
 
@@ -168,6 +172,7 @@  first_dunfell_sphinx_commit=c25fe058b88b893b0d146f3ed27320b47cdec236
 ypdocsbranch=$(git symbolic-ref -q --short HEAD || git rev-parse HEAD)
 
 git checkout origin/master set_versions.py
+cp "$builddir"/releases.json "$ypdocs"/
 #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
@@ -214,6 +219,10 @@  for branch in "$ypdocsbranch" dunfell $(git branch --remote --contains "$first_s
             . $builddir/buildtools-old/environment-setup*
         fi
         make clean
+
+        # copy the previously generated releases.json here, which is then picked for the build
+        cp "$builddir"/releases.json "$ypdocs"/
+
         SPHINXOPTS="-j auto" make publish
     )