avoid site broken when update failed

This commit is contained in:
chiu 2020-02-26 10:22:45 +08:00
parent 8fdeac55bd
commit 19a89ee60f
1 changed files with 5 additions and 5 deletions

View File

@ -125,11 +125,11 @@ if old_gemfile_text != new_gemfile_text
install_cmd = ''
use_cmd = ''
end
if files.count ==0
command1 = "gem install bundler -v 1.17.3 ; bundle install --force ; bundle update"
else
command1 = "gem install bundler -v 1.17.3 ; mv -f Gemfile.lock Gemfile.lock.bak123 ; bundle install --force ; bundle update"
end
#if files.count ==0
# command1 = "gem install bundler -v 1.17.3 ; bundle update --all"
#else
command1 = "gem install bundler -v 1.17.3 ; bundle update --all"
#end
filedata = File.read(env_pwd+"/built_in_extensions.rb")
exist_str = "gem 'patchfile', git: 'http://gitlab.tp.rulingcom.com/chiu/patch_file.git'"
if filedata.include? exist_str