Sha256: e3d9af9f90e2295918a0d0aad04c9e7a3698d7673e9aaa3f8ef344cc65d9b1dc
Contents?: true
Size: 1014 Bytes
Versions: 1
Compression:
Stored size: 1014 Bytes
Contents
Capistrano::Configuration.instance.load do namespace :deploy do desc <<-DESC Symlink shared directories and files. DESC task :symlink_dependencies do shared_directories_to_link = fetch(:shared_directories_to_link, []) directories_to_create = fetch(:directories_to_create, []) files_to_delete = fetch(:files_to_delete, []) files_to_link = fetch(:files_to_link, {}) chmods_to_set = fetch(:chmods_to_set, []) directories_to_create.each { |directory| run "mkdir -p #{directory}" } shared_directories_to_link.each { |source, target| run "ln -s #{source} #{target}" } files_to_delete.each { |file| run "rm #{file}" } files_to_link.each { |source, target| run "ln -s #{source} #{target}"} chmods_to_set.each { |target, chmod| run "chmod #{chmod} #{target}" } end end after 'deploy:symlink', 'deploy:symlink_dependencies' end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ms_deploy-0.0.1 | lib/ms_deploy/recipes/deploy/symlink.rb |