No gitolite in project any more

This commit is contained in:
Dmitriy Zaporozhets 2013-02-11 19:16:59 +02:00
parent 8e0b58d7e7
commit d64090b8a9
27 changed files with 117 additions and 159 deletions

View file

@ -7,7 +7,7 @@ namespace :gitlab do
namespaces = Namespace.pluck(:path)
git_base_path = Gitlab.config.gitolite.repos_path
git_base_path = Gitlab.config.gitlab_shell.repos_path
all_dirs = Dir.glob(git_base_path + '/*')
puts git_base_path.yellow
@ -48,7 +48,7 @@ namespace :gitlab do
warn_user_is_not_gitlab
remove_flag = ENV['REMOVE']
git_base_path = Gitlab.config.gitolite.repos_path
git_base_path = Gitlab.config.gitlab_shell.repos_path
all_dirs = Dir.glob(git_base_path + '/*')
global_projects = Project.where(namespace_id: nil).pluck(:path)
@ -68,13 +68,6 @@ namespace :gitlab do
global_projects.include?(path)
end
# skip gitolite admin
all_dirs.reject! do |dir|
repo_name = File.basename dir
repo_name == 'gitolite-admin.git'
end
all_dirs.each do |dir_path|
if remove_flag
if FileUtils.rm_rf dir_path