summaryrefslogtreecommitdiff
path: root/db/fixtures/development/02_source_code.rb
blob: 4a9e5d0c2587f664a1ed3168d307a25a25a29b26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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