migrate repost: more
This commit is contained in:
parent
cdda25fb24
commit
078b5c6f80
|
@ -8,13 +8,20 @@ namespace :repositories do
|
|||
main = cooker.repositories.find_by_name!("main")
|
||||
|
||||
repo_dirs.each do |repo_dir|
|
||||
puts repo_dir
|
||||
project_name = File.basename(repo_dir, ".git")
|
||||
puts project_name
|
||||
|
||||
puts "Creating project: #{project_name}"
|
||||
|
||||
# main.projects.create(:name => project_name, :unixname => project_name)
|
||||
# Dir
|
||||
if main.projects.find_by_name(:name => project_name)
|
||||
puts "\t Already created. Skipping"
|
||||
next
|
||||
end
|
||||
|
||||
project = main.projects.create(:name => project_name, :unixname => project_name)
|
||||
|
||||
puts "Executing: 'rm -rf #{project.git_repo_path}'"
|
||||
`rm -rf #{project.git_repo_path}`
|
||||
# `cp -a #{repo_dir} #{project.git_repo_path}`
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue