Sha256: 875361ac5ef76caaaefe19aa9813e484d52020cac06f090dc2ecdefe7e0bab13
Contents?: true
Size: 621 Bytes
Versions: 6
Compression:
Stored size: 621 Bytes
Contents
Capistrano::Configuration.instance.load do namespace :local do desc 'Synchronize your local assets using remote assets' task :sync do if Util.prompt "Are you sure you want to erase your local assets with server assets" servers = find_servers :roles => :app [assets_dir].flatten.each do |dir| system("rsync -a --del --progress --rsh='ssh -p #{fetch(:ssh_port, 22)}' #{user}@#{servers.first}:#{shared_path}/#{dir}/ #{local_assets_dir}") end end end end desc 'Synchronize your local assets using remote assets' task :pull do assets.local.sync end end
Version data entries
6 entries across 6 versions & 1 rubygems