Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ require 'capistrano/rails'
require 'capistrano/puma'
install_plugin Capistrano::Puma
install_plugin Capistrano::Puma::Systemd

# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
12 changes: 12 additions & 0 deletions lib/capistrano/tasks/contributions.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace :contributions do
desc 'Sync the contributions from scratch'
task :rebuild do
on roles(:app) do
within current_path do
with rails_env: fetch(:rails_env) do
execute :rake, 'contributions:rebuild'
end
end
end
end
end
6 changes: 6 additions & 0 deletions lib/tasks/contributions.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace :contributions do
desc 'Sync the contributions from scratch'
task rebuild: :environment do
Repo.sync(rebuild_all: true)
end
end