gitlab-org--gitlab-foss/db/fixtures/development/02_source_code.rb
Izaak Alpert f210a5d832 Updated setup to reference the gitlab-shell var
-Well really it uses what everything else uses -- would be nice to have this as a specific config var

Change-Id: I08cef6080950bf40360b461abd2535ea8890410d
2013-04-12 15:19:18 -04:00

29 lines
1.1 KiB
Ruby

gitlab_shell_path = File.expand_path("~#{Gitlab.config.gitlab_shell.ssh_user}")
root = Gitlab.config.gitlab_shell.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("#{gitlab_shell_path}/gitlab-shell/bin/gitlab-projects import-project #{project[:path]} #{project[:git]}")
print '.'
else
print 'F'
end
end
puts "OK".green