lib/capistrano/bundle_rsync/git.rb in capistrano-bundle_rsync-0.2.1 vs lib/capistrano/bundle_rsync/git.rb in capistrano-bundle_rsync-0.2.2
- old
+ new
@@ -19,16 +19,18 @@
execute :git, :remote, :update
end
end
def create_release
- hosts = release_roles(:all)
execute "mkdir -p #{config.local_release_path}"
within config.local_mirror_path do
execute :git, :archive, fetch(:branch), '| tar -x -C', "#{config.local_release_path}"
end
+ end
+ def rsync_release
+ hosts = release_roles(:all)
rsync_options = config.rsync_options
Parallel.each(hosts, in_processes: config.max_parallels(hosts)) do |host|
ssh = config.build_ssh_command(host)
execute :rsync, "#{rsync_options} --rsh='#{ssh}' #{config.local_release_path}/ #{host}:#{release_path}/"
end