Reordered developers seeds a bit. Now seeds faster and has valid post-receive files
This commit is contained in:
parent
5d219bd5f0
commit
c92726e6c8
3 changed files with 17 additions and 18 deletions
|
@ -1,5 +1,14 @@
|
|||
Project.seed(:id, [
|
||||
{ id: 1, name: "Underscore.js", path: "underscore", owner_id: 1, namespace_id: 1 },
|
||||
{ id: 2, name: "Diaspora", path: "diaspora", owner_id: 1 },
|
||||
{ id: 3, name: "Ruby on Rails", path: "rails", owner_id: 1 }
|
||||
Group.seed(:id, [
|
||||
{ id: 100, name: "Brightbox", path: 'brightbox', owner_id: 1 },
|
||||
{ id: 101, name: "KDE", path: 'kde', owner_id: 1 },
|
||||
])
|
||||
|
||||
Project.seed(:id, [
|
||||
{ id: 1, name: "Underscore.js", path: "underscore", owner_id: 1 },
|
||||
{ id: 2, name: "Diaspora", path: "diaspora", owner_id: 1 },
|
||||
{ id: 3, namespace_id: 100, name: "Brightbox CLI", path: "brightbox-cli", owner_id: 1 },
|
||||
{ id: 4, namespace_id: 100, name: "Puppet", path: "puppet", owner_id: 1 },
|
||||
{ id: 5, namespace_id: 101, name: "kdebase", path: "kdebase", owner_id: 1},
|
||||
{ id: 6, namespace_id: 101, name: "kdelibs", path: "kdelibs", owner_id: 1},
|
||||
{ id: 7, namespace_id: 101, name: "amarok", path: "amarok", owner_id: 1},
|
||||
])
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
root = Gitlab.config.git_base_path
|
||||
|
||||
projects = [
|
||||
{ path: 'root/underscore.git', git: 'https://github.com/documentcloud/underscore.git' },
|
||||
{ path: 'underscore.git', git: 'https://github.com/documentcloud/underscore.git' },
|
||||
{ path: 'diaspora.git', git: 'https://github.com/diaspora/diaspora.git' },
|
||||
{ path: 'rails.git', git: 'https://github.com/rails/rails.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' },
|
||||
]
|
||||
|
||||
projects.each do |project|
|
||||
|
@ -14,7 +15,7 @@ projects.each do |project|
|
|||
|
||||
cmds = [
|
||||
"cd #{root} && sudo -u git -H git clone --bare #{project[:git]} ./#{project[:path]}",
|
||||
"sudo cp ./lib/hooks/post-receive #{project_path}/hooks/post-receive",
|
||||
"sudo ln -s ./lib/hooks/post-receive #{project_path}/hooks/post-receive",
|
||||
"sudo chown git:git -R #{project_path}",
|
||||
"sudo chmod 770 -R #{project_path}",
|
||||
]
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
Group.seed(:id, [
|
||||
{ id: 100, name: "Gitlab", path: 'gitlab', owner_id: 1},
|
||||
{ id: 101, name: "Rails", path: 'rails', owner_id: 1 },
|
||||
{ id: 102, name: "KDE", path: 'kde', owner_id: 1 }
|
||||
])
|
||||
|
||||
Project.seed(:id, [
|
||||
{ id: 10, name: "kdebase", path: "kdebase", owner_id: 1, namespace_id: 102 },
|
||||
{ id: 11, name: "kdelibs", path: "kdelibs", owner_id: 1, namespace_id: 102 },
|
||||
{ id: 12, name: "amarok", path: "amarok", owner_id: 1, namespace_id: 102 }
|
||||
])
|
Loading…
Reference in a new issue