diff options
author | Romain Porte <microjoe@microjoe.org> | 2019-09-24 22:07:01 +0200 |
---|---|---|
committer | Romain Porte <microjoe@microjoe.org> | 2019-09-24 22:19:10 +0200 |
commit | 8734bd1a6f0944442ac8536bf3d92a5ad28f9201 (patch) | |
tree | e146d807ccd9399d4e699783fa1fedd048f53929 | |
parent | 3f96cb8a4a91742a85fe8b548749efd4b12a1ff0 (diff) | |
download | pelican-8734bd1a6f0944442ac8536bf3d92a5ad28f9201.tar.gz |
templates: tasks.py: introduce "production_port" to fix #2623
The syntax passed to rsync for specifying the port is incorrect. In the
Makefile template, the -e option is correctly used to pass the port. We
use the same syntax here to pass the SSH port.
This fix issue #2623.
Signed-off-by: Romain Porte <microjoe@microjoe.org>
-rw-r--r-- | pelican/tools/templates/tasks.py.jinja2 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pelican/tools/templates/tasks.py.jinja2 b/pelican/tools/templates/tasks.py.jinja2 index a800b79b..1c063f08 100644 --- a/pelican/tools/templates/tasks.py.jinja2 +++ b/pelican/tools/templates/tasks.py.jinja2 @@ -23,7 +23,8 @@ CONFIG = { 'deploy_path': SETTINGS['OUTPUT_PATH'], {% if ssh %} # Remote server configuration - 'production': '{{ssh_user}}@{{ssh_host}}:{{ssh_port}}', + 'production': '{{ssh_user}}@{{ssh_host}}', + 'production_port': {{ssh_port}}, 'dest_path': '{{ssh_target_dir}}', {% endif %} {% if cloudfiles %} @@ -130,6 +131,7 @@ def publish(c): c.run('pelican -s {settings_publish}'.format(**CONFIG)) c.run( 'rsync --delete --exclude ".DS_Store" -pthrvz -c ' + '-e "ssh -p {production_port}" ' '{} {production}:{dest_path}'.format( CONFIG['deploy_path'].rstrip('/') + '/', **CONFIG)) |