forked from github/pelican
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>
This commit is contained in:
parent
3f96cb8a4a
commit
8734bd1a6f
1 changed files with 3 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue