[PATCH yocto-autobuilder-helper 2/6] scripts: run-docs-build: automatically build new Bitbake branches


Quentin Schulz
 

From: Quentin Schulz <quentin.schulz@...>

Since commit 84ccba0f4aff91528f764523fe1205a354c889ed, docs of all later
releases can be built with Sphinx. Instead of manually updating this
list, let's have git return the list of remote branches which contains
this commit.

1.46 branch was initially released without Sphinx support but was later
patched, hence why it's explicitly listed.

Cc: Quentin Schulz <foss+yocto@...>
Signed-off-by: Quentin Schulz <quentin.schulz@...>
---
scripts/run-docs-build | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index f7b5f97..d8d77c7 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -37,7 +37,12 @@ mkdir $outputdir/bitbake
# https://lists.yoctoproject.org/g/docs/message/2193
# We copy the releases.rst file from master so that all versions of the docs
# see the latest releases.
-for branch in 1.46 1.48 1.50 1.52 master master-next; do
+first_sphinx_commit=84ccba0f4aff91528f764523fe1205a354c889ed
+for branch in 1.46 $(git branch --remote --contains "$first_sphinx_commit" --format '%(refname:lstrip=3)'); do
+ if [ "$branch" = "HEAD" ]; then
+ continue
+ fi
+
echo Building bitbake $branch branch
git checkout $branch
git checkout master releases.rst
--
2.35.1

Join yocto@lists.yoctoproject.org to automatically receive all group messages.