From c74f9f3721ea16477cc528b69c77de524a94931f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Tue, 18 Jun 2024 23:36:13 +0800 Subject: [PATCH] Add .use_local_gemfile in site folder to skip override Gemfile. --- announcement.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/announcement.gemspec b/announcement.gemspec index 52d04ce..fa041d1 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -32,6 +32,7 @@ if bundle_update_flag template_path = env_pwd + '/app/templates' all_template = Dir.glob(template_path+'/*/') 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') old_gemfile_text = File.read(env_pwd+'/Gemfile') check_texts = ['@import "../../bootstrap/variables";',".response-content {\n justify-self: auto;\n}\n"] @@ -175,7 +176,7 @@ if bundle_update_flag 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",'') puts 'updating gemfile' if Dir["#{env_pwd}/config/secrets.yml"].length==0