All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH yocto-autobuilder-helper] scripts: run-docs-build: make the workdir pristine between builds
@ 2022-10-03 17:04 Quentin Schulz
  2022-10-03 17:05 ` Quentin Schulz
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Quentin Schulz @ 2022-10-03 17:04 UTC (permalink / raw)
  To: yocto; +Cc: Quentin Schulz, Quentin Schulz

From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

It happened that the git repositories were dirty and resulted in
incorrect files being used. Let's use git clean -ffdx to force a
completely clean git repositories before and after checking out a branch
so that nothing is left from or to another branch build

Cc: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 scripts/run-docs-build | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index c6b3965..69e3257 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -61,6 +61,7 @@ for branch in 1.46 $(git branch --remote --contains "$first_sphinx_commit" --for
 
     echo Building bitbake $branch branch
     git checkout $branch
+    git clean -ffdx
     git checkout origin/master releases.rst
     make clean
     SPHINXOPTS="-j auto" make publish
@@ -80,7 +81,7 @@ for branch in 1.46 $(git branch --remote --contains "$first_sphinx_commit" --for
     fi
 
     cp -r ./_build/final/* $outputdir/bitbake/$branch
-    git reset --hard
+    git clean -ffdx
 done
 
 if [ "$PUBLISH" -ne 0 ]; then
@@ -100,8 +101,7 @@ first_dunfell_sphinx_commit=c25fe058b88b893b0d146f3ed27320b47cdec236
 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
-git clean -f
+git clean -ffdx
 
 for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" --format '%(refname:lstrip=3)') $(git tag --contains "$first_sphinx_commit" --contains "$first_dunfell_sphinx_commit" 'yocto-*') transition; do
     if [ "$branch" = "HEAD" ]; then
@@ -116,6 +116,7 @@ for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" --
 
     echo Building $branch
     git checkout $branch
+    git clean -ffdx
 
     if [ -e "${scriptdir}/docs-build-patches/${branch}/" ]; then
         echo Adding patch for $branch
@@ -160,8 +161,7 @@ for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" --
     fi
 
     cp -r ./_build/final/* $outputdir/$branch
-    git reset --hard
-    git clean -f
+    git clean -ffdx
 done
 
 # Update bitbake switchers.js with the copy from master ypdocs
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-10-10 14:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-03 17:04 [PATCH yocto-autobuilder-helper] scripts: run-docs-build: make the workdir pristine between builds Quentin Schulz
2022-10-03 17:05 ` Quentin Schulz
2022-10-03 17:11 ` [yocto] " Michael Opdenacker
2022-10-03 21:15   ` Luca Ceresoli
2022-10-03 21:15 ` Luca Ceresoli
2022-10-04  8:15   ` Quentin Schulz
2022-10-04 20:54     ` Luca Ceresoli
2022-10-05  8:55       ` Quentin Schulz
2022-10-10 14:34         ` Luca Ceresoli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.