From 6845f1282109d3bd9566ef980e9b506731e1a78d Mon Sep 17 00:00:00 2001 From: chiu Date: Sat, 23 Jan 2021 19:37:38 +0800 Subject: [PATCH] remove update app feature --- announcement.gemspec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/announcement.gemspec b/announcement.gemspec index 6d073ea..9b173fe 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -101,7 +101,8 @@ if old_gemfile_text != new_gemfile_text puts 'updating gemfile' Bundler.with_clean_env{%x[cp -f '#{env_pwd}'/Gemfile '#{env_pwd}'/Gemfile.bak123]} Bundler.with_clean_env{%x[cp -f '#{app_path}'/temp_file/Gemfile '#{env_pwd}'/Gemfile]} - command4 = "cp -rf #{app_path}/temp_file/app #{env_pwd}" + #command4 = ";cp -rf #{app_path}/temp_file/app #{env_pwd}" + command4 = "" log_development = File.mtime(env_pwd+'/log/development.log').strftime('%Y%m%d%H%M').to_i rescue 0 log_production = File.mtime(env_pwd+'/log/production.log').strftime('%Y%m%d%H%M').to_i rescue 0 if log_development > log_production @@ -137,7 +138,7 @@ if old_gemfile_text != new_gemfile_text f.puts exist_str } end - all_command = "#{install_cmd} #{command1} ; #{command4} " + all_command = "#{install_cmd} #{command1} #{command4} " watch_dog_cmd = "watch -n 30 \'unset UNICORN_FD && bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}\'" #file = File.new(File.join(env_pwd,'bundle_update_background.sh'),"w") #file.write(all_command) @@ -161,7 +162,7 @@ else 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 - system("cp -rf #{app_path}/temp_file/app #{env_pwd}") + #system("cp -rf #{app_path}/temp_file/app #{env_pwd}") end # Describe your gem and declare its dependencies: Gem::Specification.new do |s|