doing migrate repos

This commit is contained in:
Timothy N. Tsvetkov 2011-04-27 18:21:26 +04:00
parent 4f29a63296
commit 913636d38d
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
namespace :repositories do
desc "Migrate repositories from fs"
task :migrate => :environment do
repos_dirs = Dir["/root/mandriva_main_git/*.git"]
cooker = Platform.find_by_name!("cooker")
main = cooker.repositories.find_by_name!("main")
repos_dirs.each do |repo_dir|
puts repo_dir
puts File.basename(repos_dir, ".git")
project_name = File.basename(repos_dir, ".git")
# main.projects.create(:name => project_name, :unixname => project_name)
# Dir
end
end
end