Add .use_local_gemfile in site folder to skip override Gemfile.

This commit is contained in:
邱博亞 2024-06-18 23:36:13 +08:00
parent 7917c8a2f3
commit c74f9f3721
1 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ if bundle_update_flag
template_path = env_pwd + '/app/templates' template_path = env_pwd + '/app/templates'
all_template = Dir.glob(template_path+'/*/') all_template = Dir.glob(template_path+'/*/')
puts 'editing files for sassc' puts 'editing files for sassc'
use_local_gemfile = File.exist?(env_pwd + '/.use_local_gemfile')
new_gemfile_text = File.read(app_path+'/temp_file/Gemfile') new_gemfile_text = File.read(app_path+'/temp_file/Gemfile')
old_gemfile_text = File.read(env_pwd+'/Gemfile') old_gemfile_text = File.read(env_pwd+'/Gemfile')
check_texts = ['@import "../../bootstrap/variables";',".response-content {\n justify-self: auto;\n}\n"] check_texts = ['@import "../../bootstrap/variables";',".response-content {\n justify-self: auto;\n}\n"]
@ -175,7 +176,7 @@ if bundle_update_flag
end end
end end
end end
if old_gemfile_text != new_gemfile_text if !use_local_gemfile && old_gemfile_text != new_gemfile_text
unicorn_rails = %x[which unicorn_rails].sub("\n",'') unicorn_rails = %x[which unicorn_rails].sub("\n",'')
puts 'updating gemfile' puts 'updating gemfile'
if Dir["#{env_pwd}/config/secrets.yml"].length==0 if Dir["#{env_pwd}/config/secrets.yml"].length==0