Created
July 1, 2014 11:45
-
-
Save Willianvdv/6ecb6537c4cd9b88ab58 to your computer and use it in GitHub Desktop.
Execute remote task with Capistrano 3
This file contains hidden or 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
# Usage: bundle exec cap staging execute:rake task=db:migrate | |
namespace :execute do | |
task :rake do | |
on roles(:all) do | |
within release_path do | |
with rails_env: fetch(:rails_env) do | |
execute :bundle, "exec rake #{ENV['task']}" | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment