Created
July 27, 2009 22:15
-
-
Save danielvlopes/156788 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :assets do | |
task :symlink, :roles => :app do | |
assets.create_dir | |
run <<-CMD | |
rm -rf #{current_path}/public/images/upload && | |
ln -nfs #{shared_path}/upload #{release_path}/public/images/upload | |
CMD | |
end | |
task :create_dir, :roles => :app do | |
run "test -d #{shared_path}/upload || mkdir -p #{shared_path}/upload" | |
end | |
end | |
after "deploy:update_code","assets:symlink" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment