|
|
|
@ -611,29 +611,29 @@ class WelcomeController < ApplicationController
|
|
|
|
|
shixun.update_column(:git_url, g.project(shixun.gpid).path_with_namespace)
|
|
|
|
|
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};
|
|
|
|
|
# git add .;git commit -m '..';git push origin master")
|
|
|
|
|
# logger.info("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!over")
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
|
|
# 如果有目录才执行
|
|
|
|
|
new_giturl = "http://educoder:xinhu1ji2qu3@"+g.project(shixun.gpid).http_url_to_repo.split('//').last.gsub("bdgit.educoder.net", "172.16.95.5:8889")
|
|
|
|
|
logger.info("##########_------------- path: #{File.directory?("/home/pdl/educoder/tmp/repositories/local/#{local_git_path}")}")
|
|
|
|
|
logger.info("##########_------------- path: #{"/home/pdl/educoder/tmp/repositories/local/#{local_git_path}"}")
|
|
|
|
|
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/educoder/tmp/repositories/local/#{local_git_path}")
|
|
|
|
|
if File.directory?("/home/pdl/trustie24/tmp/repositories/local/#{local_git_path}")
|
|
|
|
|
logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@-----daole")
|
|
|
|
|
system("cd /home/pdl/educoder/tmp/repositories/local/#{local_git_path};git remote remove origin;git remote add origin #{new_giturl};
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
# # 如果有目录才执行
|
|
|
|
|
# new_giturl = "http://educoder:xinhu1ji2qu3@"+g.project(shixun.gpid).http_url_to_repo.split('//').last.gsub("bdgit.educoder.net", "172.16.95.5:8889")
|
|
|
|
|
# logger.info("##########_------------- path: #{File.directory?("/home/pdl/educoder/tmp/repositories/local/#{local_git_path}")}")
|
|
|
|
|
# logger.info("##########_------------- path: #{"/home/pdl/educoder/tmp/repositories/local/#{local_git_path}"}")
|
|
|
|
|
# logger.info("##########_------------- new_giturl: #{new_giturl}")
|
|
|
|
|
# if File.directory?("/home/pdl/educoder/tmp/repositories/local/#{local_git_path}")
|
|
|
|
|
# logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@-----daole")
|
|
|
|
|
# system("cd /home/pdl/educoder/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
|
|
|
|
|
|
|
|
|
|
# http://Hjqreturn:xinhu1ji2qu3@bdgit.educoder.net/Hjqreturn/pgfqe6ch8.git (fetch)
|
|
|
|
|
|
|
|
|
|
# 同步关卡信息
|
|
|
|
|