scripts: run-docs-build: patch yocto-3.3 and 3.4 releases

Both releases are missing an important patch that changes the displayed
version from dev to the appropriate release number.

This is confusing to the user and probably breaks some assumptions in
some scripts.

Ideally, the tags should have been moved with those patches applied to
their respective branch but that is not a git best practice so we're
stuck with this "hack" instead.

3.3.x releases aren't impacted as they got the patch applied.

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Quentin Schulz 2021-10-27 13:33:03 +02:00 committed by Richard Purdie
parent ed331e7405
commit 2b05713022
3 changed files with 110 additions and 0 deletions

View File

@ -7,6 +7,7 @@ ypdocs=$2/documentation/
bbdocs=$3/doc/ bbdocs=$3/doc/
docs_buildtools=/srv/autobuilder/autobuilder.yoctoproject.org/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.sh docs_buildtools=/srv/autobuilder/autobuilder.yoctoproject.org/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.sh
outputdir=$builddir/output outputdir=$builddir/output
scriptdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
cd $builddir cd $builddir
@ -84,6 +85,13 @@ for tag in $(git tag --list 'yocto-*'); do
if [ "$first" = "$v_sphinx" ]; then if [ "$first" = "$v_sphinx" ]; then
cd $ypdocs cd $ypdocs
git checkout $tag git checkout $tag
# yocto-3.3 and yocto-3.4 were tagged before the current_version in
# conf.py was changed resulting in sphinx believing these are
# development branches which breaks all sorts of assumptions. Moving a
# tag isn't best practice so we just patch the releases here instead.
if [ "$tag" = "yocto-3.3" ] || [ "$tag" = "yocto-3.4" ]; then
git am "${scriptdir}/${tag}/0001-conf-update-for-release.patch"
fi
make clean make clean
make publish make publish
version=$(echo $tag | cut -c7-) version=$(echo $tag | cut -c7-)

View File

@ -0,0 +1,48 @@
From 02f6e97894aa768ca1a7546646c35a175aca9a33 Mon Sep 17 00:00:00 2001
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Date: Fri, 1 Oct 2021 17:21:48 +0200
Subject: [PATCH] conf: update for release 3.3
conf.py:
* set version to 3.3
switchers.js:
* add 3.3 release
* update 'dev' to 3.4
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
documentation/conf.py | 2 +-
documentation/sphinx-static/switchers.js | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/documentation/conf.py b/documentation/conf.py
index 5a2e25f7b..ab1b2b14c 100644
--- a/documentation/conf.py
+++ b/documentation/conf.py
@@ -16,7 +16,7 @@ import os
import sys
import datetime
-current_version = "dev"
+current_version = "3.3"
# String used in sidebar
version = 'Version: ' + current_version
diff --git a/documentation/sphinx-static/switchers.js b/documentation/sphinx-static/switchers.js
index 7a4edc9e7..96efab2e8 100644
--- a/documentation/sphinx-static/switchers.js
+++ b/documentation/sphinx-static/switchers.js
@@ -2,7 +2,8 @@
'use strict';
var all_versions = {
- 'dev': 'dev (3.3)',
+ 'dev': 'dev (3.4)',
+ '3.3': '3.3',
'3.2.3': '3.2.3',
'3.1.6': '3.1.6',
'3.0.4': '3.0.4',
--
2.31.1

View File

@ -0,0 +1,54 @@
From f6dcef2532c741c8b3ad251152b45e4079062ee3 Mon Sep 17 00:00:00 2001
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Date: Thu, 21 Oct 2021 10:36:37 +0200
Subject: [PATCH] [honister] conf: update for release 3.4
conf.py:
* set version to 3.4
switchers.js:
* add 3.4 release
* update 'dev' to 3.5
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
Not tested + Assumed to be enough
No need to wait for the new release as the honister branch will be
integrated in the docs only when tagged but let's make sure we don't
forget to do this change before tagging a release.
documentation/conf.py | 2 +-
documentation/sphinx-static/switchers.js | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/documentation/conf.py b/documentation/conf.py
index 8e0847938..104b49ea0 100644
--- a/documentation/conf.py
+++ b/documentation/conf.py
@@ -16,7 +16,7 @@ import os
import sys
import datetime
-current_version = "dev"
+current_version = "3.4"
# String used in sidebar
version = 'Version: ' + current_version
diff --git a/documentation/sphinx-static/switchers.js b/documentation/sphinx-static/switchers.js
index 1e37b625a..6038dbb5a 100644
--- a/documentation/sphinx-static/switchers.js
+++ b/documentation/sphinx-static/switchers.js
@@ -2,7 +2,8 @@
'use strict';
var all_versions = {
- 'dev': 'dev (3.4)',
+ 'dev': 'dev (3.5)',
+ '3.4': '3.4',
'3.3.3': '3.3.3',
'3.2.4': '3.2.4',
'3.1.11': '3.1.11',
--
2.31.1