Class: Roger::Release::Finalizers::Rsync
- Inherits:
-
Base
- Object
- Processors::Base
- Base
- Roger::Release::Finalizers::Rsync
- Defined in:
- lib/roger/release/finalizers/rsync.rb
Overview
Finalizes the release by uploading your project with rsync to a remote server
Instance Attribute Summary
Attributes inherited from Processors::Base
Instance Method Summary collapse
Methods inherited from Processors::Base
Instance Method Details
#default_options ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/roger/release/finalizers/rsync.rb', line 19 def { rsync: "rsync", remote_path: "", host: nil, username: nil, ask: true } end |
#perform ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/roger/release/finalizers/rsync.rb', line 29 def perform # Validate options return unless prompt_for_upload check_rsync_command(@options[:rsync]) local_path = @release.build_path.to_s remote_path = @options[:remote_path] local_path += "/" unless local_path =~ %r{/\Z} remote_path += "/" unless remote_path =~ %r{/\Z} release.log(self, "Starting upload of #{(@release.build_path + '*')} to #{@options[:host]}") rsync(@options[:rsync], local_path, remote_path) end |