Merge pull request #2624 from MicroJoe/fix-invoke-publish-ssh-port

Use correct SSH port syntax for rsync in tasks.py. Fixes #2623
This commit is contained in:
Justin Mayer 2019-10-09 11:11:04 -07:00 committed by GitHub
commit 761f2e34e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,8 @@ CONFIG = {
'deploy_path': SETTINGS['OUTPUT_PATH'], 'deploy_path': SETTINGS['OUTPUT_PATH'],
{% if ssh %} {% if ssh %}
# Remote server configuration # Remote server configuration
'production': '{{ssh_user}}@{{ssh_host}}:{{ssh_port}}', 'production': '{{ssh_user}}@{{ssh_host}}',
'production_port': {{ssh_port}},
'dest_path': '{{ssh_target_dir}}', 'dest_path': '{{ssh_target_dir}}',
{% endif %} {% endif %}
{% if cloudfiles %} {% if cloudfiles %}
@ -130,6 +131,7 @@ def publish(c):
c.run('pelican -s {settings_publish}'.format(**CONFIG)) c.run('pelican -s {settings_publish}'.format(**CONFIG))
c.run( c.run(
'rsync --delete --exclude ".DS_Store" -pthrvz -c ' 'rsync --delete --exclude ".DS_Store" -pthrvz -c '
'-e "ssh -p {production_port}" '
'{} {production}:{dest_path}'.format( '{} {production}:{dest_path}'.format(
CONFIG['deploy_path'].rstrip('/') + '/', CONFIG['deploy_path'].rstrip('/') + '/',
**CONFIG)) **CONFIG))