run-docs-build: build from tags dynamically instead of static list
PATCH 1/1 run-docs-build: build from tags dynamically instead of static list
All new releases are Sphinx ready so we exclude old tags and build for all the rest.
--- scripts/run-docs-build | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
scripts/run-docs-build +10 -4
@@ -7,6 +7,7 @@ ypdocs=$2/documentation/ bbdocs=$3/doc/ docs_buildtools=/srv/autobuilder/autobuilder.yoctoproject.org/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.sh outputdir=$builddir/output +excluded_tags="yocto-3.1.4 yocto-3.1.3 yocto-3.1.2 yocto-3.1.1 yocto-3.1 yocto-3.0.1 yocto-3.0 yocto-2.6.4 yocto-2.6.3 yocto-2.7.1 yocto-2.6.2 yocto-2.7 yocto-2.6.1 yocto-2.6 yocto-2.5.2 yocto-2.5.1 yocto-2.4.4 yocto-2.4.3 yocto-2.5 yocto-2.3.4 yocto-1.0.2 yocto-1.1.2 yocto-1.2.2 yocto-1.2.1 yocto-1.3 yocto-1.3.1 yocto-1.3.2 yocto-1.4.3 yocto-1.4.2 yocto-1.4.1 yocto-1.4 yocto-2.1.3 yocto-2.4.2 yocto-2.1.1 yocto-2.1.2 yocto-2.0.3 yocto-1.8.2 yocto-2.2.3 yocto-2.4.1 yocto-2.3.3 yocto-2.3.2 yocto-2.4 yocto-2.2.2 yocto-2.3.1 yocto-2.3 yocto-2.2.1 yocto-2.0.2 yocto-2.2 yocto-2.1 yocto-2.0.1 yocto-2.0 yocto-1.8.1 yocto-1.7.3 yocto-1.6.3 yocto-1.7.2 yocto-1.8 yocto-1.5.1" cd $builddir
@@ -77,13 +78,18 @@ for branch in dunfell gatesgarth hardknott; do done # Yocto Project releases/tags -for tag in 3.1.5 3.1.6 3.2 3.2.1 3.2.2 3.2.3; do +cd $ypdocs +for tag in $(git tag -l |grep 'yocto-' |sort); do + if [[ $excluded_tags =~ $tag ]]; then + continue + fi cd $ypdocs - git checkout yocto-$tag + git checkout $tag make clean make publish - mkdir $outputdir/$tag - cp -r ./_build/final/* $outputdir/$tag + version=$(echo $tag | cut -c7-) + mkdir $outputdir/$version + cp -r ./_build/final/* $outputdir/$version done # Update switchers.js with the copy from master ypdocs
Signature · 1 line
2.30.2
Hi Michael,
Quoted 24 lines · Michael Halstead
All new releases are Sphinx ready so we exclude old tags and build for all the rest.
Signed-off-by Michael Halstead <[email protected]>---
scripts/run-docs-build| 14 ++++++++++----1 file changed, 10 insertions(+), 4 deletions(-)scripts/run-docs-build +0
-0@@ -7,6 +7,7 @@ ypdocs=$2/documentation/bbdocs=$3/doc/
docs_buildtools=/srv/autobuilder/autobuilder.yoctoproject.org/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.sh
outputdir=$builddir/output
+excluded_tags="yocto-3.1.4 yocto-3.1.3 yocto-3.1.2 yocto-3.1.1 yocto-3.1 yocto-3.0.1 yocto-3.0 yocto-2.6.4 yocto-2.6.3 yocto-2.7.1 yocto-2.6.2 yocto-2.7 yocto-2.6.1 yocto-2.6 yocto-2.5.2 yocto-2.5.1 yocto-2.4.4 yocto-2.4.3 yocto-2.5 yocto-2.3.4 yocto-1.0.2 yocto-1.1.2 yocto-1.2.2 yocto-1.2.1 yocto-1.3 yocto-1.3.1 yocto-1.3.2 yocto-1.4.3 yocto-1.4.2 yocto-1.4.1 yocto-1.4 yocto-2.1.3 yocto-2.4.2 yocto-2.1.1 yocto-2.1.2 yocto-2.0.3 yocto-1.8.2 yocto-2.2.3 yocto-2.4.1 yocto-2.3.3 yocto-2.3.2 yocto-2.4 yocto-2.2.2 yocto-2.3.1 yocto-2.3 yocto-2.2.1 yocto-2.0.2 yocto-2.2 yocto-2.1 yocto-2.0.1 yocto-2.0 yocto-1.8.1 yocto-1.7.3 yocto-1.6.3 yocto-1.7.2 yocto-1.8 yocto-1.5.1"cd $builddir
scripts/run-docs-build +0
-0@@ -77,13 +78,18 @@ for branch in dunfell gatesgarth hardknott; dodone
# Yocto Project releases/tags
scripts/run-docs-build for branch in dunfell gatesgarth hardknott; do · line 82
Quoted 3 lines
scripts/run-docs-build +2
-1-for tag in 3.1.5 3.1.6 3.2 3.2.1 3.2.2 3.2.3; do +cd $ypdocs +for tag in $(git tag -l |grep 'yocto-' |sort); do
IIUC the man page,
git tag --list 'yocto-*' | sort
would be doing the same thing as the one command with grep above. Discovered it recently so just wanted to share.
I guess this is something we can also do for bitbake Sphinx documentation?
Removed the git context inadvertently but, is =~ some bash built-in? I don't know what's the shebang on top but maybe we want to force it to bash since I'm not sure it's POSIX "compliant" anymore?
Thanks,
Quentin
hey!
Quoted 7 lines · Quentin Schulz
Hi Michael,
Quoted 2 lines · Michael Halstead
All new releases are Sphinx ready so we exclude old tags and build for all the rest.
Thanks for starting this!
Quoted 31 lines
Quoted 11 lines
Signed-off-by Michael Halstead <[email protected]>---
scripts/run-docs-build| 14 ++++++++++----1 file changed, 10 insertions(+), 4 deletions(-)scripts/run-docs-build +0
-0@@ -7,6 +7,7 @@ ypdocs=$2/documentation/Quoted 2 lines
bbdocs=$3/doc/
docs_buildtools=/srv/autobuilder/
autobuilder.yoctoproject.org/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.shQuoted 2 lines
outputdir=$builddir/output
+excluded_tags="yocto-3.1.4 yocto-3.1.3 yocto-3.1.2 yocto-3.1.1 yocto-3.1yocto-3.0.1 yocto-3.0 yocto-2.6.4 yocto-2.6.3 yocto-2.7.1 yocto-2.6.2 yocto-2.7 yocto-2.6.1 yocto-2.6 yocto-2.5.2 yocto-2.5.1 yocto-2.4.4 yocto-2.4.3 yocto-2.5 yocto-2.3.4 yocto-1.0.2 yocto-1.1.2 yocto-1.2.2 yocto-1.2.1 yocto-1.3 yocto-1.3.1 yocto-1.3.2 yocto-1.4.3 yocto-1.4.2 yocto-1.4.1 yocto-1.4 yocto-2.1.3 yocto-2.4.2 yocto-2.1.1 yocto-2.1.2 yocto-2.0.3 yocto-1.8.2 yocto-2.2.3 yocto-2.4.1 yocto-2.3.3 yocto-2.3.2 yocto-2.4 yocto-2.2.2 yocto-2.3.1 yocto-2.3 yocto-2.2.1 yocto-2.0.2 yocto-2.2 yocto-2.1 yocto-2.0.1 yocto-2.0 yocto-1.8.1 yocto-1.7.3 yocto-1.6.3 yocto-1.7.2 yocto-1.8 yocto-1.5.1"
Quoted 6 lines
cd $builddir
scripts/run-docs-build +0
-0@@ -77,13 +78,18 @@ for branch in dunfell gatesgarth hardknott; dodone
Quoted 8 lines
scripts/run-docs-build for branch in dunfell gatesgarth hardknott; do · line 82
Quoted 4 lines
# Yocto Project releases/tags
scripts/run-docs-build +2
-1-for tag in 3.1.5 3.1.6 3.2 3.2.1 3.2.2 3.2.3; do +cd $ypdocs +for tag in $(git tag -l |grep 'yocto-' |sort); doIIUC the man page,
git tag --list 'yocto-*' | sort
sort -V is even better since it does "natural sort of (version) numbers within text", let's get ready for 3.10 ;)
And using -V, how about something along these lines:
v_sphinx='yocto-3.1.5'
for v in $(git tag --list 'yocto-*'); do
first=$(printf '%s\n%s' $v $v_sphinx | sort -V | head -n1)
if [ "$first" = "$v_sphinx" ]; then
echo "Yocto $v uses Sphinx!"
fidone
and it outputs the following when I run it locally:
Yocto yocto-3.1.5 uses Sphinx!
Yocto yocto-3.1.6 uses Sphinx!
Yocto yocto-3.2 uses Sphinx!
Yocto yocto-3.2.1 uses Sphinx!
Yocto yocto-3.2.2 uses Sphinx!
Yocto yocto-3.2.3 uses Sphinx!
would be doing the same thing as the one command with grep above.
Quoted 4 lines
Discovered it recently so just wanted to share.
I guess this is something we can also do for bitbake Sphinx documentation?
yes.
Quoted 4 lines
Removed the git context inadvertently but, is =~ some bash built-in? I don't know what's the shebang on top but maybe we want to force it to bash since I'm not sure it's POSIX "compliant" anymore?
It is bash already.
Quoted 6 lines
Reviewed-by Quentin Schulz <[email protected]>Thanks,
Quentin
Quoted 79 lines · Nicolas Dechesne
hey!
Quoted 7 lines · Quentin Schulz
Hi Michael,
Quoted 2 lines · Michael Halstead
All new releases are Sphinx ready so we exclude old tags and build for all the rest.
Thanks for starting this!
Quoted 31 lines
Quoted 11 lines
Signed-off-by Michael Halstead <[email protected]>---
scripts/run-docs-build| 14 ++++++++++----1 file changed, 10 insertions(+), 4 deletions(-)scripts/run-docs-build +0
-0@@ -7,6 +7,7 @@ ypdocs=$2/documentation/Quoted 2 lines
bbdocs=$3/doc/
docs_buildtools=/srv/autobuilder/
autobuilder.yoctoproject.org/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.shQuoted 2 lines
outputdir=$builddir/output +excluded_tags="yocto-3.1.4 yocto-3.1.3 yocto-3.1.2 yocto-3.1.1
yocto-3.1 yocto-3.0.1 yocto-3.0 yocto-2.6.4 yocto-2.6.3 yocto-2.7.1 yocto-2.6.2 yocto-2.7 yocto-2.6.1 yocto-2.6 yocto-2.5.2 yocto-2.5.1 yocto-2.4.4 yocto-2.4.3 yocto-2.5 yocto-2.3.4 yocto-1.0.2 yocto-1.1.2 yocto-1.2.2 yocto-1.2.1 yocto-1.3 yocto-1.3.1 yocto-1.3.2 yocto-1.4.3 yocto-1.4.2 yocto-1.4.1 yocto-1.4 yocto-2.1.3 yocto-2.4.2 yocto-2.1.1 yocto-2.1.2 yocto-2.0.3 yocto-1.8.2 yocto-2.2.3 yocto-2.4.1 yocto-2.3.3 yocto-2.3.2 yocto-2.4 yocto-2.2.2 yocto-2.3.1 yocto-2.3 yocto-2.2.1 yocto-2.0.2 yocto-2.2 yocto-2.1 yocto-2.0.1 yocto-2.0 yocto-1.8.1 yocto-1.7.3 yocto-1.6.3 yocto-1.7.2 yocto-1.8 yocto-1.5.1"
Quoted 6 lines
cd $builddir
scripts/run-docs-build +0
-0@@ -77,13 +78,18 @@ for branch in dunfell gatesgarth hardknott; dodone
Quoted 8 lines
scripts/run-docs-build for branch in dunfell gatesgarth hardknott; do · line 82
Quoted 4 lines
# Yocto Project releases/tags
scripts/run-docs-build +2
-1-for tag in 3.1.5 3.1.6 3.2 3.2.1 3.2.2 3.2.3; do +cd $ypdocs +for tag in $(git tag -l |grep 'yocto-' |sort); doIIUC the man page,
git tag --list 'yocto-*' | sortsort -V is even better since it does "natural sort of (version) numbers within text", let's get ready for 3.10 ;)
And using -V, how about something along these lines:
v_sphinx='yocto-3.1.5'
for v in $(git tag --list 'yocto-*'); dofirst=$(printf '%s\n%s' $v $v_sphinx | sort -V | head -n1) if [ "$first" = "$v_sphinx" ]; then echo "Yocto $v uses Sphinx!" fidone
and it outputs the following when I run it locally:
Yocto yocto-3.1.5 uses Sphinx!
Yocto yocto-3.1.6 uses Sphinx!
Yocto yocto-3.2 uses Sphinx!
Yocto yocto-3.2.1 uses Sphinx!
Yocto yocto-3.2.2 uses Sphinx!
Yocto yocto-3.2.3 uses Sphinx!
Quoted 8 lines
would be doing the same thing as the one command with grep above.
Quoted 4 lines
Discovered it recently so just wanted to share.
I guess this is something we can also do for bitbake Sphinx documentation?
yes.
Well, in fact no , we shouldn't, is a short answer ;)
Here is the long answer..
For bitbake and YP, we currently publish: master, master-next and 'stable' branches (e.g. 1.46, 1.48, 1.50 for bitbake dunfell, gatesgarth, hardknott for YP). Then we also publish YP releases (and point releases), e.g. 3.1.5 and beyond, but we don't publish anything for releases/point release of bitbake, At least just yet. And it's a 'bug'. Since the YP docs includes links (with intersphinx) to bitbake docs, then when we look at a master, master-next or any branches on docs.yp.org, then the links are correct. for example if you look at
https://docs.yoctoproject.org/dunfell/what-i-wish-id-known.html
vs
https://docs.yoctoproject.org/gatesgarth/what-i-wish-id-known.html
this page has links to bitbake and it points respectively to:
https://docs.yoctoproject.org/bitbake/1.46/bitbake-user-manual/bitbake-user-manual-intro.html#generating-dependency-graphs
and
https://docs.yoctoproject.org/bitbake/1.48/bitbake-user-manual/bitbake-user-manual-intro.html#generating-dependency-graphs
Which is correct.
[Side note: I've noticed that the hardknott page is wrong, since
https://docs.yoctoproject.org/hardknott/what-i-wish-id-known.html
and the following link
Quoted 1 line
https://docs.yoctoproject.org/bitbake/bitbake-user-manual/bitbake-user-manual-intro.html#generating-dependency-graphs
I will send a patch for that]
Now if we look at a YP release, such as
https://docs.yoctoproject.org/3.1.6/what-i-wish-id-known.html
it has this link:
https://docs.yoctoproject.org/bitbake/1.46/bitbake-user-manual/bitbake-user-manual-intro.html#generating-dependency-graphs
which is not correct, since it links to a bitbake 'branch' docs build, and not a bitbake 'release' docs build.
Quoted 17 lines
Quoted 5 lines
Removed the git context inadvertently but, is =~ some bash built-in? I don't know what's the shebang on top but maybe we want to force it to bash since I'm not sure it's POSIX "compliant" anymore?
It is bash already.
Quoted 6 lines
Reviewed-by Quentin Schulz <[email protected]>Thanks,
Quentin