From 2a5b826180e501412e924246814248ad80518214 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Tue, 3 Dec 2019 15:12:26 -0500 Subject: [PATCH] excludes.txt -> rsync_excludes.txt (#2659) Give the rsync excludes file a bit more of a descriptive name. --- pelican/tools/pelican_quickstart.py | 4 ++-- pelican/tools/templates/Makefile.jinja2 | 2 +- .../{excludes.txt.jinja2 => rsync_excludes.txt.jinja2} | 0 pelican/tools/templates/tasks.py.jinja2 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename pelican/tools/templates/{excludes.txt.jinja2 => rsync_excludes.txt.jinja2} (100%) diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py index 0eb031a5..134b16fb 100755 --- a/pelican/tools/pelican_quickstart.py +++ b/pelican/tools/pelican_quickstart.py @@ -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: diff --git a/pelican/tools/templates/Makefile.jinja2 b/pelican/tools/templates/Makefile.jinja2 index b7d7812d..6e4d4052 100644 --- a/pelican/tools/templates/Makefile.jinja2 +++ b/pelican/tools/templates/Makefile.jinja2 @@ -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 %} diff --git a/pelican/tools/templates/excludes.txt.jinja2 b/pelican/tools/templates/rsync_excludes.txt.jinja2 similarity index 100% rename from pelican/tools/templates/excludes.txt.jinja2 rename to pelican/tools/templates/rsync_excludes.txt.jinja2 diff --git a/pelican/tools/templates/tasks.py.jinja2 b/pelican/tools/templates/tasks.py.jinja2 index a20f93e3..8e047104 100644 --- a/pelican/tools/templates/tasks.py.jinja2 +++ b/pelican/tools/templates/tasks.py.jinja2 @@ -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