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.

Constant Summary

Constants included from FileUtilsExt

FileUtilsExt::DEFAULT

Constants included from FileUtils

FileUtils::LN_SUPPORTED, FileUtils::RUBY

Instance Method Summary collapse

Methods inherited from SshDirPublisher

#initialize

Methods included from FileUtilsExt

#nowrite, #rake_check_options, #rake_merge_option, #rake_output_message, #verbose, #when_writing

Methods included from FileUtils

#ruby, #safe_ln, #sh, #split_all

Constructor Details

This class inherits a constructor from Rake::SshDirPublisher

Instance Method Details

#uploadObject

Uploads the files after removing the existing remote directory.



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

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