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

Patch

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