From 2462949fd598258204a8b6b98c2c91b5eabde847 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Sun, 23 Dec 2012 21:16:26 +0100 Subject: [PATCH] Update output of gitlab:gitolite:update_* --- lib/tasks/gitlab/gitolite_rebuild.rake | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/tasks/gitlab/gitolite_rebuild.rake b/lib/tasks/gitlab/gitolite_rebuild.rake index fce10eb5..af2a2127 100644 --- a/lib/tasks/gitlab/gitolite_rebuild.rake +++ b/lib/tasks/gitlab/gitolite_rebuild.rake @@ -1,24 +1,27 @@ namespace :gitlab do namespace :gitolite do - desc "GITLAB | Rebuild each project at gitolite config" + desc "GITLAB | Rebuild each project in Gitolite config" task :update_repos => :environment do - puts "Starting Projects" + warn_user_is_not_gitlab + + puts "Rebuilding projects ... " Project.find_each(:batch_size => 100) do |project| - puts "\n=== #{project.name}" + puts "#{project.name_with_namespace.yellow} ... " project.update_repository - puts + puts "... #{"done".green}" end - puts "Done with projects" end - desc "GITLAB | Rebuild each key at gitolite config" + desc "GITLAB | Rebuild each user key in Gitolite config" task :update_keys => :environment do - puts "Starting Key" + warn_user_is_not_gitlab + + puts "Rebuilding keys ... " Key.find_each(:batch_size => 100) do |key| + puts "#{key.identifier.yellow} ... " Gitlab::Gitolite.new.set_key(key.identifier, key.key, key.projects) - print '.' + puts "... #{"done".green}" end - puts "Done with keys" end end end