From d968e696a6c97252f885eb5366d8bbaa15ce4522 Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 25 Feb 2020 21:26:22 +0800 Subject: [PATCH] try --- announcement.gemspec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/announcement.gemspec b/announcement.gemspec index 03e50fa..325eefd 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -115,6 +115,9 @@ if old_gemfile_text != new_gemfile_text if watch_dog.scan("auto_reopen_#{dir_name}").count != 0 Bundler.with_clean_env{%x[screen -ls | grep auto_reopen_#{dir_name} | cut -d. -f1 | awk '{print $1}' | xargs kill]} end + #if %x[ruby -v].scan(/\d\.\d\.\d/)[0] == '2.1.3' + install_cmd = 'rvm install 2.1.10 && rvm use default 2.1.10' + #end if files.count ==0 command1 = "gem install bundler -v 1.17.3 ; bundle install --force ; bundle update" else @@ -130,7 +133,7 @@ if old_gemfile_text != new_gemfile_text f.puts exist_str } end - all_command = "#{command1} ; #{command2} #{command3} #{command4} ; kill -s TERM `cat tmp/pids/unicorn.pid` ; unset UNICORN_FD ; bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now" + all_command = "#{install_cmd} ; #{command1} ; #{command2} #{command3} #{command4} ; kill -s TERM `cat tmp/pids/unicorn.pid` ; unset UNICORN_FD ; bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now" watch_dog_cmd = "watch -n 30 \"unset UNICORN_FD && bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now\"" #file = File.new(File.join(env_pwd,'bundle_update_background.sh'),"w") #file.write(all_command)