autofix problem
This commit is contained in:
parent
999b82268c
commit
05ab1328a4
|
@ -159,6 +159,16 @@ if bundle_update_flag
|
|||
if old_gemfile_text != new_gemfile_text
|
||||
unicorn_rails = %x[which unicorn_rails].sub("\n",'')
|
||||
puts 'updating gemfile'
|
||||
if Dir["#{env_pwd}/config/secrets.yml"].length==0
|
||||
r = open("#{env_pwd}/config/environment.rb",'r'){|f| f.read()}
|
||||
secret_key = r.scan(/Orbit::Application\.config\.secret_key_base = '(.*)'/).flatten[0] rescue nil
|
||||
if !secret_key.nil?
|
||||
open("#{env_pwd}/config/secrets.yml",'r+') do |f|
|
||||
c = {"production"=> {"secret_key_base"=> secret_key},"development"=> {"secret_key_base"=> secret_key}}.to_yaml.sub("---\n",'')
|
||||
f.write(c)
|
||||
end
|
||||
end
|
||||
end
|
||||
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}"
|
||||
|
|
Loading…
Reference in New Issue