diff mbox series

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

Message ID 20220719081214.1924835-2-foss+yocto@0leil.net
State New
Headers show
Series [yocto-autobuilder-helper,1/2] scripts: run-docs-build: use latest version of set_versions.py script | expand

Commit Message

Quentin Schulz July 19, 2022, 8:12 a.m. UTC
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

`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@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
 scripts/run-docs-build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


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
-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