auto change git remote url
This commit is contained in:
parent
d85331887a
commit
02c1b2685c
|
@ -9,6 +9,12 @@ puts 'editing files for sassc'
|
||||||
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 position: relative;\n\n @media (min-width: $screen-sm) {\n width: 100%;\n }\n\n @media (min-width: $screen-md) {\n width: 970px;\n }\n\n @media (min-width: $screen-lg) {\n width: 1100px;\n }\n}\n"]
|
check_texts = ['@import "../../bootstrap/variables";',".response-content {\n position: relative;\n\n @media (min-width: $screen-sm) {\n width: 100%;\n }\n\n @media (min-width: $screen-md) {\n width: 970px;\n }\n\n @media (min-width: $screen-lg) {\n width: 1100px;\n }\n}\n"]
|
||||||
|
git_url = %x[cd '#{ENV['PWD']}' && git config --get remote.origin.url].sub("\n",'')
|
||||||
|
git_remote = %x[cd '#{ENV['PWD']}' && git remote].sub("\n",'')
|
||||||
|
if git_url != 'https://ruling.digital/git'
|
||||||
|
puts 'changing remote url'
|
||||||
|
system("cd #{ENV['PWD']} && git remote set-url #{git_remote} https://ruling.digital/git")
|
||||||
|
end
|
||||||
all_template.each do |folder|
|
all_template.each do |folder|
|
||||||
if !folder.include?('mobile')
|
if !folder.include?('mobile')
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
#test!!!!!!!!
|
#test1!!!!!!!!
|
||||||
#social gems
|
#social gems
|
||||||
gem "omniauth-google-oauth2"
|
gem "omniauth-google-oauth2"
|
||||||
|
|
||||||
|
|
|
@ -140,8 +140,11 @@ class Admin::PlaygroundController < OrbitAdminController
|
||||||
end
|
end
|
||||||
mul.status['alive'] = false
|
mul.status['alive'] = false
|
||||||
mul.save
|
mul.save
|
||||||
|
if command == 'bundle update'
|
||||||
|
system('sleep 2')
|
||||||
Bundler.with_clean_env{system("kill -s USR2 `cat tmp/pids/unicorn.pid`")}
|
Bundler.with_clean_env{system("kill -s USR2 `cat tmp/pids/unicorn.pid`")}
|
||||||
end
|
end
|
||||||
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
mul.status['alive'] = false
|
mul.status['alive'] = false
|
||||||
mul.status['output'] << e.inspect
|
mul.status['output'] << e.inspect
|
||||||
|
|
Loading…
Reference in New Issue