ansible/roles/fedora-docs/build/templates/docs-sync.j2
2017-08-24 20:44:39 +00:00

20 lines
485 B
Django/Jinja
Executable file

#!/bin/sh
if [ ! -d /srv/web/docs ]
then
echo "/srv/web/docs missing"
cd /srv/web
{% if env == 'staging' %}
git clone https://pagure.io/fedora-docs/fedora-docs-web.git docs
{% else %}
git clone https://pagure.io/fedora-docs-web.git docs
{% endif %}
fi
cd /srv/web/docs
/usr/bin/git reset -q --hard
{% if env == 'staging' %}
/usr/bin/git checkout -q stg
{% endif %}
/usr/bin/git pull -q --ff-only