Commit 2462949fd598258204a8b6b98c2c91b5eabde847

Authored by Riyad Preukschas
1 parent 31e0fa65

Update output of gitlab:gitolite:update_*

Showing 1 changed file with 12 additions and 9 deletions   Show diff stats
lib/tasks/gitlab/gitolite_rebuild.rake
1 1 namespace :gitlab do
2 2 namespace :gitolite do
3   - desc "GITLAB | Rebuild each project at gitolite config"
  3 + desc "GITLAB | Rebuild each project in Gitolite config"
4 4 task :update_repos => :environment do
5   - puts "Starting Projects"
  5 + warn_user_is_not_gitlab
  6 +
  7 + puts "Rebuilding projects ... "
6 8 Project.find_each(:batch_size => 100) do |project|
7   - puts "\n=== #{project.name}"
  9 + puts "#{project.name_with_namespace.yellow} ... "
8 10 project.update_repository
9   - puts
  11 + puts "... #{"done".green}"
10 12 end
11   - puts "Done with projects"
12 13 end
13 14  
14   - desc "GITLAB | Rebuild each key at gitolite config"
  15 + desc "GITLAB | Rebuild each user key in Gitolite config"
15 16 task :update_keys => :environment do
16   - puts "Starting Key"
  17 + warn_user_is_not_gitlab
  18 +
  19 + puts "Rebuilding keys ... "
17 20 Key.find_each(:batch_size => 100) do |key|
  21 + puts "#{key.identifier.yellow} ... "
18 22 Gitlab::Gitolite.new.set_key(key.identifier, key.key, key.projects)
19   - print '.'
  23 + puts "... #{"done".green}"
20 24 end
21   - puts "Done with keys"
22 25 end
23 26 end
24 27 end
... ...