diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 6f2b64ff..d087b7d1 100755 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -612,16 +612,21 @@ class WelcomeController < ApplicationController local_git_path = local_shixun.local_giturl.split('/').last if local_shixun.local_giturl.present? new_giturl = "http://educoder:xinhu1ji2qu3@"+g.project(shixun.gpid).http_url_to_repo.split('//').last # 如果有目录才执行 - logger.info("##########_------------- path: #{File.directory?("/home/pdl/trustie24/tmp/repositories/local/#{local_git_path}")}") - logger.info("##########_------------- new_giturl: #{new_giturl}") - if File.directory?("/home/pdl/trustie24/tmp/repositories/local/#{local_git_path}") - logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@-----daole") - system("cd /home/pdl/trustie24/tmp/repositories/local/#{local_git_path};git remote remove origin;git remote add origin #{new_giturl}; + # logger.info("##########_------------- path: #{File.directory?("/home/pdl/trustie24/tmp/repositories/local/#{local_git_path}")}") + # logger.info("##########_------------- new_giturl: #{new_giturl}") + # if File.directory?("/home/pdl/trustie24/tmp/repositories/local/#{local_git_path}") + # logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@-----daole") + # system("cd /home/pdl/trustie24/tmp/repositories/local/#{local_git_path};git remote remove origin;git remote add origin #{new_giturl}; + # git add .;git commit -m '..';git push origin master") + # logger.info("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!over") + # end + + # 如果有目录才执行 + if system("cd tmp/repositories/#{local_git_path}") + system("cd tmp/repositories/#{local_git_path};git remote remove origin;git remote add origin #{new_giturl}; git add .;git commit -m '..';git push origin master") - logger.info("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!over") end - # http://Hjqreturn:xinhu1ji2qu3@bdgit.educoder.net/Hjqreturn/pgfqe6ch8.git (fetch) # 同步关卡信息