Message ID | 20220318163651.3016936-2-foss+yocto@0leil.net |
---|---|
State | New |
Headers | show |
Series | [yocto-autobuilder-helper,1/6] scripts: run-docs-build: factor out all bitbake branches building | expand |
On 3/18/22 17:36, Quentin Schulz wrote: > From: Quentin Schulz <quentin.schulz@theobroma-systems.com> > > 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@0leil.net> > Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> > --- > 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 Very good idea! I learned a new git option today. Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Thanks! Michael.
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