Sha256: 3bef75e068102bc1d94fff64c41df9fee816d91d35e4545a1b38033b10c336c3
Contents?: true
Size: 943 Bytes
Versions: 7
Compression:
Stored size: 943 Bytes
Contents
Capistrano::Configuration.instance(:must_exist).load do # These are set to the same structure in shared <=> current set :normal_symlinks, %w( config/database.yml ) unless exists?(:normal_symlinks) # Weird symlinks go somewhere else. Weird. set :weird_symlinks, { 'bundle' => 'vendor/bundle' } unless exists?(:weird_symlinks) namespace :symlinks do desc "Make all the damn symlinks in a single run" task :make, :roles => :app, :except => { :no_release => true } do commands = normal_symlinks.map do |path| "rm -rf #{current_path}/#{path} && \ ln -s #{shared_path}/#{path} #{current_path}/#{path}" end commands += weird_symlinks.map do |from, to| "rm -rf #{current_path}/#{to} && \ ln -s #{shared_path}/#{from} #{current_path}/#{to}" end run <<-CMD cd #{current_path} && #{commands.join(" && ")} CMD end end end
Version data entries
7 entries across 7 versions & 1 rubygems