From: Quentin Schulz <[email protected]>

The rsync only makes sense for the Autobuilder as most people don't have
access to [email protected]. Therefore, to allow for easier
contribution to this script, let's allow to skip the rsync so the script
can continue to run.

Cc: Quentin Schulz <[email protected]>
Signed-off-by: Quentin Schulz <[email protected]>
---
 scripts/run-docs-build | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index 6569928..a060a31 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -8,6 +8,7 @@
 #                     Can be found here: 
https://autobuilder.yocto.io/pub/buildtools/
 #   - docbookarchive as the path to old (pre 3.1.5 and Sphinx migration) docs 
tarball
 #                     Can be found here: 
https://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-archives-20201105.tar.xz
+#   - PUBLISH (0/1) for whether the files should be rsync'ed to 
docs.yoctoproject.org
 
 set -e
 set -u
@@ -20,6 +21,7 @@ bbdocs=$(realpath "$3/doc/")
 
docs_buildtools=${docs_buildtools:-/srv/autobuilder/autobuilder.yocto.io/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-3.2+snapshot-20201105.sh}
 outputdir=$builddir/output
 scriptdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
+PUBLISH=${PUBLISH:-1}
 
 
 cd $builddir
@@ -68,10 +70,12 @@ for branch in 1.46 $(git branch --remote --contains 
"$first_sphinx_commit" --for
     git reset --hard
 done
 
-# only sync bitbake folder for now. We need bitbake to be published first
-# since the bitbake intersphinx index will be downloaded to build yocto-docs
-cd $outputdir
-rsync -irlp --checksum --ignore-times --delete bitbake 
[email protected]:docs/
+if [ "$PUBLISH" -ne 0 ]; then
+    # only sync bitbake folder for now. We need bitbake to be published first
+    # since the bitbake intersphinx index will be downloaded to build 
yocto-docs
+    cd $outputdir
+    rsync -irlp --checksum --ignore-times --delete bitbake 
[email protected]:docs/
+fi
 
 cd $ypdocs
 
@@ -142,5 +146,7 @@ ln -s $tag $outputdir/current
 cd $outputdir/bitbake
 find . -name switchers.js -exec cp $outputdir/current/_static/switchers.js {} 
\;
 
-cd $outputdir
-rsync -irlp --checksum --ignore-times --delete . 
[email protected]:docs/
+if [ "$PUBLISH" -ne 0 ]; then
+    cd $outputdir
+    rsync -irlp --checksum --ignore-times --delete . 
[email protected]:docs/
+fi
-- 
2.35.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#56809): https://lists.yoctoproject.org/g/yocto/message/56809
Mute This Topic: https://lists.yoctoproject.org/mt/90566464/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to