auto input git name and email if not existed
This commit is contained in:
parent
ae2735fb5f
commit
cef19ae494
|
@ -174,6 +174,12 @@ class Admin::SitesController < OrbitAdminController
|
|||
"#{git} add -f '#{v}'"
|
||||
end.join(' && ')
|
||||
time_now = Time.now.strftime('%Y_%m_%d_%H_%M')
|
||||
if %x[git config user.name].empty?
|
||||
%x[git config --global user.name "rulingcom"]
|
||||
end
|
||||
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}")}
|
||||
mul.update_attributes(status: 'finish')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue