excludes.txt -> rsync_excludes.txt (#2659)

Give the rsync excludes file a bit more of a descriptive name.
This commit is contained in:
David Cantrell 2019-12-03 15:12:26 -05:00 committed by David Cantrell
commit 2a5b826180
5 changed files with 8 additions and 8 deletions

View file

@ -409,9 +409,9 @@ needed by Pelican.
except OSError as e:
print('Error: {0}'.format(e))
try:
with open(os.path.join(CONF['basedir'], 'excludes.txt'),
with open(os.path.join(CONF['basedir'], 'rsync_excludes.txt'),
'w', 'utf-8') as fd:
_template = _jinja_env.get_template('excludes.txt.jinja2')
_template = _jinja_env.get_template('rsync_excludes.txt.jinja2')
fd.write(_template.render(**CONF))
fd.close()
except OSError as e:

View file

@ -132,7 +132,7 @@ sftp_upload: publish
{% set upload = upload + ["rsync_upload"] %}
rsync_upload: publish
rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --include tags --cvs-exclude --exclude-from=excludes.txt --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --include tags --cvs-exclude --exclude-from=rsync_excludes.txt --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
{% endif %}
{% if dropbox %}

View file

@ -169,7 +169,7 @@ def publish(c):
"""Publish to production via rsync"""
pelican_run("-s {settings_publish}".format(**CONFIG))
c.run(
'rsync --delete --exclude-from=excludes.txt -pthrvz -c '
'rsync --delete --exclude-from=rsync_excludes.txt -pthrvz -c '
'-e "ssh -p {ssh_port}" '
"{} {ssh_user}@{ssh_host}:{ssh_path}".format(
CONFIG["deploy_path"].rstrip("/") + "/", **CONFIG