dev_local
cxt 5 years ago
parent aed4ea1699
commit db89dc1305

@ -612,16 +612,21 @@ class WelcomeController < ApplicationController
local_git_path = local_shixun.local_giturl.split('/').last if local_shixun.local_giturl.present? 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 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("##########_------------- path: #{File.directory?("/home/pdl/trustie24/tmp/repositories/local/#{local_git_path}")}")
logger.info("##########_------------- new_giturl: #{new_giturl}") # logger.info("##########_------------- new_giturl: #{new_giturl}")
if File.directory?("/home/pdl/trustie24/tmp/repositories/local/#{local_git_path}") # if File.directory?("/home/pdl/trustie24/tmp/repositories/local/#{local_git_path}")
logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@-----daole") # logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@-----daole")
system("cd /home/pdl/trustie24/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
# 如果有目录才执行
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") git add .;git commit -m '..';git push origin master")
logger.info("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!over")
end end
# http://Hjqreturn:xinhu1ji2qu3@bdgit.educoder.net/Hjqreturn/pgfqe6ch8.git (fetch) # http://Hjqreturn:xinhu1ji2qu3@bdgit.educoder.net/Hjqreturn/pgfqe6ch8.git (fetch)
# 同步关卡信息 # 同步关卡信息

Loading…
Cancel
Save