Class: Rake::SshFreshDirPublisher

Inherits:
SshDirPublisher show all
Defined in:
lib/rake/contrib/sshpublisher.rb

Overview

Publish an entire directory to a fresh remote directory using SSH.

Instance Method Summary collapse

Methods inherited from SshDirPublisher

#initialize

Constructor Details

This class inherits a constructor from Rake::SshDirPublisher

Instance Method Details

#uploadObject

Uploads the files after removing the existing remote directory.



31
32
33
34
35
# File 'lib/rake/contrib/sshpublisher.rb', line 31

def upload
  sh "ssh", @host, "rm", "-rf", @remote_dir rescue nil
  sh "ssh", @host, "mkdir",     @remote_dir
  super
end