2012-02-29 21:38:24 +01:00
|
|
|
desc "Rewrite hooks for repos"
|
|
|
|
task :update_hooks => :environment do
|
|
|
|
puts "Starting Projects"
|
|
|
|
Project.find_each(:batch_size => 100) do |project|
|
|
|
|
begin
|
|
|
|
if project.commit
|
2012-03-11 09:47:30 +01:00
|
|
|
project.write_hooks
|
2012-02-29 21:38:24 +01:00
|
|
|
print ".".green
|
|
|
|
end
|
|
|
|
rescue Exception => e
|
|
|
|
print e.message.red
|
|
|
|
end
|
|
|
|
end
|
|
|
|
puts "\nDone with projects"
|
|
|
|
end
|