[PATCH yocto-autobuilder-helper 1/2] scripts: run-docs-build: use latest version of set_versions.py script


Quentin Schulz
 

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

`git checkout <pathspec>` without <tree-ish> only undo the changes made
to pathspec compared to HEAD. It is not guaranteed that HEAD is on
latest commit of master branch from upstream when running this script,
therefore let's add the <tree-ish> argument to specify which branch to
use to make sure set_versions.py is the latest, otherwise getlatest
might return the wrong information.

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

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index 489fa78..6a71d54 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -97,7 +97,7 @@ cd $ypdocs
first_sphinx_commit=01dd5af7954e24552aca022917669b27bb0541ed
first_dunfell_sphinx_commit=c25fe058b88b893b0d146f3ed27320b47cdec236

-git checkout set_versions.py
+git checkout origin/master set_versions.py
#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
--
2.36.1

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