This commit is contained in:
BoHung Chiu 2021-03-13 19:06:11 +08:00
parent c8c6f43d71
commit e0e07be565
1 changed files with 3 additions and 3 deletions

View File

@ -52,9 +52,9 @@ module PersonalPluginGenerator
end
git = 'git_1.9.1/usr/bin/git'
end
@branch = `git rev-parse --abbrev-ref HEAD`.gsub("\n","")
new_commit_id = `git log #{@branch}..origin/#{@branch} --pretty=format:"%H"`
new_updates = %x(git log #{@branch}..origin/#{@branch} --pretty=format:"%ad' , '%s" --date=short).split("\n").map{|log| log.gsub("'","")}
@branch = %x(#{git} rev-parse --abbrev-ref HEAD).gsub("\n","")
new_commit_id = %x(#{git} log #{@branch}..origin/#{@branch} --pretty=format:"%H")
new_updates = %x(#{git} log #{@branch}..origin/#{@branch} --pretty=format:"%ad' , '%s" --date=short).split("\n").map{|log| log.gsub("'","")}
if new_commit_id.present?
git_add_except_public = Dir['*'].select{|v| v!= 'public' && v!= 'log' && v != 'dump' && v != 'tmp'}.collect do |v|
"#{git} add -f --all --ignore-errors '#{v}'"