fix update manager error
This commit is contained in:
parent
cef19ae494
commit
ec276a225a
|
@ -76,9 +76,9 @@ if old_gemfile_text != new_gemfile_text
|
|||
Bundler.with_clean_env{%x[screen -ls | grep auto_reopen_#{dir_name} | cut -d. -f1 | awk '{print $1}' | xargs kill]}
|
||||
end
|
||||
if files.count ==0
|
||||
command1 = "cd #{env_pwd} && gem install bundler -v 1.17.3 && bundle install --force && bundle update"
|
||||
command1 = "cd #{env_pwd} && gem install bundler -v 1.17.3 && bundle update --force"
|
||||
else
|
||||
command1 = "cd #{env_pwd} && gem install bundler -v 1.17.3 && mv -f Gemfile.lock Gemfile.lock.bak123 && bundle install --force && bundle update"
|
||||
command1 = "cd #{env_pwd} && gem install bundler -v 1.17.3 && mv -f Gemfile.lock Gemfile.lock.bak123 && bundle update --force"
|
||||
end
|
||||
Bundler.with_clean_env{system("cd #{env_pwd} && screen -d -m -S auto_reopen_#{dir_name} watch -n 30 bundle exec --keep-file-descriptors #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now")}
|
||||
filedata = File.read(env_pwd+"/built_in_extensions.rb")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
source 'https://rubygems.org'
|
||||
#complete2!!!!!!!!
|
||||
#fix update manager error!!!!!!!!
|
||||
#social gems
|
||||
gem "omniauth-google-oauth2"
|
||||
|
||||
|
|
|
@ -170,9 +170,10 @@ class Admin::SitesController < OrbitAdminController
|
|||
git_add_except_public = Dir['*'].select{|v| v!= 'public'}.collect do |v|
|
||||
"#{git} add -f '#{v}'"
|
||||
end.join(' && ')
|
||||
git_add_all_program = (Dir['app/*'].select{|v| !v.include? 'templates'} + Dir['lib/*'] + Dir['config/*'].select{|v| !v.include? 'mongoid.yml'}).collect do |v|
|
||||
"#{git} add -f '#{v}'"
|
||||
git_add_custom = (Dir['*'].select{|v| v !='app' && v != 'lib' && v != 'config'} + ['app/templates','config/mongoid.yml']).collect do |v|
|
||||
"#{git} add -f --all '#{v}'"
|
||||
end.join(' && ')
|
||||
git_restore = "#{git} checkout ."
|
||||
time_now = Time.now.strftime('%Y_%m_%d_%H_%M')
|
||||
if %x[git config user.name].empty?
|
||||
%x[git config --global user.name "rulingcom"]
|
||||
|
@ -180,7 +181,7 @@ class Admin::SitesController < OrbitAdminController
|
|||
if %x[git config user.email].empty?
|
||||
%x[git config --global user.email "orbit@rulingcom.com"]
|
||||
end
|
||||
Bundler.with_clean_env{system("#{git_add_except_public} && #{git} commit -m auto_backup_before_#{type}_#{time_now} && #{git} reset #{commit} --mixed && #{git_add_all_program} && #{git} reset #{commit} --merge && #{git_add_except_public}&& #{git} commit -m complete_#{type}_#{time_now}")}
|
||||
Bundler.with_clean_env{system("#{git_add_except_public} && #{git} commit -m auto_backup_before_#{type}_#{time_now} && #{git} reset #{commit} --mixed && #{git_add_custom} && #{git_restore} && #{git_add_except_public}&& #{git} commit -m complete_#{type}_#{time_now}")}
|
||||
mul.update_attributes(status: 'finish')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue