gstreamer/ci/gitlab/freedesktop_doc_importer.sh
Thibault Saunier a619f2cedf docs: Always build documentation on gstreamer/gstreamer main branch
So artifacts can the be imported on gst.fd.o.

And update the importation script accordingly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/952>
2021-09-29 16:40:00 +00:00

36 lines
959 B
Bash
Executable file

#!/bin/sh
set -e
BRANCH=main
NAMESPACE=gstreamer
JOB=documentation
WORK_DIR=$(mktemp -d -p "$DIR")
# deletes the temp directory
cleanup() {
rm -rf "$WORK_DIR"
echo "Deleted temp working directory $WORK_DIR"
}
# register the cleanup function to be called on the EXIT signal
trap cleanup EXIT
echo ""
echo "============================================================================================================================"
echo "Updating documentation from: https://gitlab.freedesktop.org/$NAMESPACE/gstreamer/-/jobs/artifacts/$BRANCH/download?job=$JOB"
date
cd $WORK_DIR
wget https://gitlab.freedesktop.org/$NAMESPACE/gstreamer/-/jobs/artifacts/$BRANCH/download?job=$JOB -O gstdocs.zip
unzip gstdocs.zip
DOC_BASE="/srv/gstreamer.freedesktop.org/public_html/documentation"
rsync -rvaz --links --delete documentation/ $DOC_BASE || /bin/true
chmod -R g+w $DOC_BASE; chgrp -R gstreamer $DOC_BASE
echo "Done updating documentation"
echo ""