[release-notes: 1/2] a script to preform nightly builds for translator preview.

Pete Travis immanetize at fedoraproject.org
Sat Oct 18 19:11:05 UTC 2014


commit 8ba30a404173b432e3dd2df5b4ff2ddd7bb62bf2
Author: Pete Travis <immanetize at fedoraproject.org>
Date:   Sat Oct 18 13:10:27 2014 -0600

    a script to preform nightly builds for translator preview.
    
    NEEDSWORK - does not share errors nicely.

 build/nightly-cron.sh |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)
---
diff --git a/build/nightly-cron.sh b/build/nightly-cron.sh
new file mode 100644
index 0000000..433742e
--- /dev/null
+++ b/build/nightly-cron.sh
@@ -0,0 +1,43 @@
+# this won't work without .git/config set up and .tx/config current
+
+tempdir="/tmp/relnotes-nightly-build"
+target_path="/srv/groups/docs/release-notes"
+fpl_target="fedorapeople.org:$target_path"
+ssh fedorapeople.org rm -rf $target_path
+ssh fedorapeople.org mkdir $target_path
+
+rm -rf $tempdir/{logs,builds}
+mkdir -p $tempdir/{logs,builds}
+
+pushd $tempdir
+#git clone ssh://git.fedorahosted.org/git/docs/release-notes.git
+
+relnotesdir="${tempdir}/release-notes"
+popd
+pushd $relnotesdir
+publican clean
+git pull
+tx pull -a
+
+LOCALES=\"en-US\"
+for LANGDIR in * ; do
+    if locale -a|sed -e's/_/-/'|grep -qx ${LANGDIR}; then
+      publican build --langs=${LANGDIR} --formats=html-single > /dev/null
+      RESULT=$?
+      ssh fedorapeople.org mkdir $fpl_target/${LANGDIR}
+      if [[ "$RESULT" -ne 0 ]]; then
+        LOGFILE=${tempdir}/logs/${LANGDIR}.xmllint.log
+        xmllint --noout --xinclude --postvalid --noent tmp/${LANGDIR}/xml_tmp/*.xml &> $LOGFILE
+        scp $LOGFILE $fpl_target/${LANGDIR}/
+      elif [[ "$RESULT" -eq 0 ]];then
+        mkdir $tempdir/builds/${LANGDIR}
+        mv tmp/${LANGDIR}/html-single/index.html $tempdir/builds/${LANGDIR}/
+      fi
+    fi
+  done
+pushd $tempdir/builds
+unlink $tempdir/release-notes/tmp/en-US/html-single/Common_Content
+mv $tempdir/release-notes/tmp/en-US/html-single/Common_Content $tempdir/builds/en-US
+rsync -vrP $tempdir/builds/* $fpl_target/
+ssh fedorapeople.org '(cd /srv/groups/docs/release-notes;for dir in *; do ln -s ../en-US/Common_Content $dir/;done)'
+popd


More information about the docs-commits mailing list