This commit is contained in:
chiu 2020-02-17 21:01:57 +08:00
parent 1f5ee39c1c
commit 5824f807dc
1 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ if old_gemfile_text != new_gemfile_text
end
files = Dir[ENV['PWD']+'/Gemfile.lock']
dir_name = ENV['PWD'].split('/')[-1]
%x["screen -ls | grep auto_reopen_#{dir_name} | cut -d. -f1 | awk '{print $1}' | xargs kill"]
%x[screen -ls | grep auto_reopen_#{dir_name} | cut -d. -f1 | awk '{print $1}' | xargs kill]
if files.count ==0
command1 = "cd #{ENV['PWD']} && gem install bundler -v 1.17.3 && bundle update"
else
@ -87,7 +87,7 @@ if old_gemfile_text != new_gemfile_text
f.puts exist_str
}
end
all_command = "#{command1} && cd #{ENV['PWD']} && #{command2} ; #{command3} ; kill -s TERM `cat tmp/pids/unicorn.pid` ; bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now"
all_command = "#{command1} && cd #{ENV['PWD']} && #{command2} ; #{command3} ; #{command4} ; kill -s TERM `cat tmp/pids/unicorn.pid` ; bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now"
a = Thread.start do
Bundler.with_clean_env do
puts ENV['PWD']