mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
excludes.txt -> rsync_excludes.txt (#2659)
Give the rsync excludes file a bit more of a descriptive name.
This commit is contained in:
parent
9b80a5ddb8
commit
2a5b826180
5 changed files with 8 additions and 8 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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 %}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue