Class: Deployer::ConfigDeployer
- Inherits:
-
BaseDeployer
- Object
- BaseDeployer
- Deployer::ConfigDeployer
- Defined in:
- lib/deployer/config_deployer.rb
Instance Attribute Summary
Attributes inherited from BaseDeployer
Instance Method Summary collapse
- #deploy! ⇒ Object
-
#initialize(options = {}) ⇒ ConfigDeployer
constructor
A new instance of ConfigDeployer.
Constructor Details
#initialize(options = {}) ⇒ ConfigDeployer
Returns a new instance of ConfigDeployer.
2 3 4 5 |
# File 'lib/deployer/config_deployer.rb', line 2 def initialize( = {}) [:deploy_via] = 'svn' super() end |
Instance Method Details
#deploy! ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/deployer/config_deployer.rb', line 7 def deploy! puts "deploying to #{stage.name} via #{deploy_via}".light_blue.on_blue Deployer::Executor.new(stage, verbose: verbose?) do |executor| create_base_dirs(executor) update_scm(executor) source = cached_copy_dir('..', 'config', "%{stagename}", "%{hostname}", '') target = config_source_dir cmd = "rsync -r --exclude=.svn #{source} #{target}" executor.execute(cmd) # stage.hosts.each do |host| # hostname = host[:host] # source = cached_copy_dir('..', 'config', stage.name, hostname, '') # target = config_source_dir # # we use rsync to copy without .svn folders # cmd = "mkdir -p #{target} && rsync -r --exclude=.svn #{source} #{target}" # executor.execute_on(host, cmd) # end end end |