This commit is contained in:
BoHung Chiu 2021-03-17 10:00:14 +08:00
parent 0c4187ddf3
commit 89760f23e5
1 changed files with 1 additions and 0 deletions

View File

@ -52,6 +52,7 @@ module PersonalPluginGenerator
end
git = 'git_1.9.1/usr/bin/git'
end
%x(cd #{ENV['PWD']} && #{git} fetch origin)
@branch = %x(cd #{ENV['PWD']} && #{git} rev-parse --abbrev-ref HEAD).gsub("\n","")
new_commit_id = %x(cd #{ENV['PWD']} && #{git} log #{@branch}..origin/#{@branch} --pretty=format:"%H")
new_updates = %x(cd #{ENV['PWD']} && #{git} log #{@branch}..origin/#{@branch} --pretty=format:"%ad' , '%s" --date=short).split("\n").map{|log| log.gsub("'","")}