gitlabhq/lib/tasks/gitlab/gitolite_rebuild.rake
randx 7cdc5b9e04 Use similar interface to access gitolite
Simplified gitolite handle logic
Stubn over monkeypatch
Stub only specific methods in Gitlab:Gitolite
Moved grach auth to lib
added specs for keys observer
removes SshKey role
2012-08-29 00:04:06 +03:00

25 lines
706 B
Ruby

namespace :gitlab do
namespace :gitolite do
desc "GITLAB | Rebuild each project at gitolite config"
task :update_repos => :environment do
puts "Starting Projects"
Project.find_each(:batch_size => 100) do |project|
puts
puts "=== #{project.name}"
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)
print '.'
end
puts "Done with keys"
end
end
end