fix git cannot access for old version(ubuntu<=14.04)

This commit is contained in:
chiu 2020-04-02 17:45:38 +08:00
parent 5c4611a386
commit 7df1bb7bf7
1 changed files with 2 additions and 2 deletions

View File

@ -12,9 +12,9 @@ old_gemfile_text = File.read(env_pwd+'/Gemfile')
check_texts = ['@import "../../bootstrap/variables";',".response-content {\n justify-self: auto;\n}\n"] check_texts = ['@import "../../bootstrap/variables";',".response-content {\n justify-self: auto;\n}\n"]
git_url = Bundler.with_clean_env{%x[cd '#{env_pwd}' && git config --get remote.origin.url].sub("\n",'')} git_url = Bundler.with_clean_env{%x[cd '#{env_pwd}' && git config --get remote.origin.url].sub("\n",'')}
git_remote = Bundler.with_clean_env{%x[cd '#{env_pwd}' && git remote].sub("\n",'')} git_remote = Bundler.with_clean_env{%x[cd '#{env_pwd}' && git remote].sub("\n",'')}
if git_url != 'https://ruling.digital/git' if git_url != 'http://ruling.digital/git'
puts 'changing remote url' puts 'changing remote url'
Bundler.with_clean_env{system("cd #{env_pwd} && git remote set-url #{git_remote} https://ruling.digital/git")} Bundler.with_clean_env{system("cd #{env_pwd} && git remote set-url #{git_remote} http://ruling.digital/git")}
end end
all_template.each do |folder| all_template.each do |folder|
if !folder.include?('mobile') if !folder.include?('mobile')