gitlabhq/lib/tasks/gitlab/gitolite_rebuild.rake

25 lines
694 B
Ruby
Raw Normal View History

2012-04-04 00:02:54 +02:00
namespace :gitlab do
namespace :gitolite do
desc "GITLAB | Rebuild each project at gitolite config"
2012-09-26 13:18:10 +02:00
task :update_repos => :environment do
2012-04-04 00:02:54 +02:00
puts "Starting Projects"
Project.find_each(:batch_size => 100) do |project|
2012-09-26 13:18:10 +02:00
puts "\n=== #{project.name}"
2012-04-04 00:02:54 +02:00
project.update_repository
puts
end
puts "Done with projects"
end
desc "GITLAB | Rebuild each key at gitolite config"
task :update_keys => :environment do
puts "Starting Key"
Key.find_each(:batch_size => 100) do |key|
Gitlab::Gitolite.new.set_key(key.identifier, key.key, key.projects)
2012-04-04 00:02:54 +02:00
print '.'
end
puts "Done with keys"
end
end
end