Add fail safe to check uncommitted changes

This commit is contained in:
NARUSE, Yui 2024-12-25 16:55:27 +09:00
parent ddf62c4c20
commit d88c066f42

View File

@ -115,6 +115,9 @@ class << Merger = Object.new
end
tagname = "v#{v.join('_')}#{("_#{pl}" if v[0] < "2" || (v[0] == "2" && v[1] < "1") || /^(?:preview|rc)/ =~ pl)}"
unless execute('git', 'diff', '--exit-code')
abort 'uncommitted changes'
end
unless execute('git', 'tag', tagname)
abort 'specfied tag already exists. check tag name and remove it if you want to force re-tagging'
end