From db89dc1305d5034f7bf45cdcf14e676c3f3c7996 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 26 Sep 2019 09:15:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/welcome_controller.rb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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) # 同步关卡信息