Browse Source

Make username optionnal in ssh publisher configuration.

main
Guillaume Subiron 12 years ago
committed by Lakshmi Vyasarajan
parent
commit
3c357a3994
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      hyde/ext/publishers/ssh.py

+ 4
- 4
hyde/ext/publishers/ssh.py View File

@@ -18,8 +18,8 @@ In site.yaml, add the following lines
opts: -r -e ssh opts: -r -e ssh


Note that the final two settings (command and opts) are optional, and the Note that the final two settings (command and opts) are optional, and the
values shown are the default. With this set, generate and publish the site
as follows:
values shown are the default. Username is also optional.
With this set, generate and publish the site as follows:


>$ hyde gen >$ hyde gen
>$ hyde publish -p ssh >$ hyde publish -p ssh
@@ -44,10 +44,10 @@ class SSH(Publisher):
self.opts = getattr(settings, 'opts', '-r -e ssh') self.opts = getattr(settings, 'opts', '-r -e ssh')


def publish(self): def publish(self):
command = "{command} {opts} ./ {username}@{server}:{target}".format(
command = "{command} {opts} ./ {username}{server}:{target}".format(
command=self.command, command=self.command,
opts=self.opts, opts=self.opts,
username=self.username,
username=self.username+'@' if self.username else '',
server=self.server, server=self.server,
target=self.target) target=self.target)
deploy_path = self.site.config.deploy_root_path.path deploy_path = self.site.config.deploy_root_path.path


Loading…
Cancel
Save