Created
June 11, 2012 15:49
-
-
Save dplummer/2910781 to your computer and use it in GitHub Desktop.
vlad precompile assets locally task
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 :vlad do | |
namespace :assets do | |
remote_task :symlink, :roles => :app do | |
run <<-CMD | |
rm -rf #{latest_release}/public/assets && | |
mkdir -p #{latest_release}/public && | |
mkdir -p #{shared_path}/assets && | |
ln -s #{shared_path}/assets #{latest_release}/public/assets | |
CMD | |
end | |
remote_task :upload, :roles => :app do | |
`scp -r public/assets #{target_host}:#{shared_path}` | |
end | |
task :deploy => ['assets:precompile', :upload, :symlink] | |
end | |
end | |
# Insert into your vlad:deploy chain before starting the app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment