Refactored and fixed seeds to work with gitlab-shell

This commit is contained in:
Dmitriy Zaporozhets 2013-02-09 15:13:56 +02:00
parent 152f87864c
commit 38985390b0
11 changed files with 14 additions and 24 deletions

View file

@ -0,0 +1,29 @@
root = Gitlab.config.gitolite.repos_path
projects = [
{ path: 'underscore.git', git: 'https://github.com/documentcloud/underscore.git' },
{ path: 'diaspora.git', git: 'https://github.com/diaspora/diaspora.git' },
{ path: 'brightbox/brightbox-cli.git', git: 'https://github.com/brightbox/brightbox-cli.git' },
{ path: 'brightbox/puppet.git', git: 'https://github.com/brightbox/puppet.git' },
{ path: 'gitlab/gitlabhq.git', git: 'https://github.com/gitlabhq/gitlabhq.git' },
{ path: 'gitlab/gitlab-ci.git', git: 'https://github.com/gitlabhq/gitlab-ci.git' },
{ path: 'gitlab/gitlab-recipes.git', git: 'https://github.com/gitlabhq/gitlab-recipes.git' },
]
projects.each do |project|
project_path = File.join(root, project[:path])
if File.exists?(project_path)
print '-'
next
end
if system("/home/git/gitlab-shell/bin/gitlab-projects import-project #{project[:path]} #{project[:git]}")
print '.'
else
print 'F'
end
end
puts "OK".green