Skip to content

Commit

Permalink
Run any rake task on remote
Browse files Browse the repository at this point in the history
  • Loading branch information
stoivo committed Sep 19, 2017
1 parent 62b795f commit e94ea27
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/capistrano/tasks/migrations.rake
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ namespace :deploy do
end

after 'deploy:updated', 'deploy:migrate'

desc 'Runs any rake task, cap deploy:rake task=db:rollback'
task rake: [:set_rails_env] do
on fetch(:migration_servers) do
within release_path do
with rails_env: fetch(:rails_env) do
execute :rake, ENV['task']
end
end
end
end
end

namespace :load do
Expand Down

0 comments on commit e94ea27

Please sign in to comment.