mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 18:24:52 -06:00
FEATURE: new release_note:generate rake task
This commit is contained in:
parent
96afdb173d
commit
2f8e28c918
23
lib/tasks/release_note.rake
Normal file
23
lib/tasks/release_note.rake
Normal file
@ -0,0 +1,23 @@
|
||||
desc "generate a release note from the important commits"
|
||||
task "release_note:generate", :tag do |t, args|
|
||||
tag = args[:tag] || `git describe --tags --abbrev=0`.strip
|
||||
|
||||
bug_fixes = []
|
||||
new_features = []
|
||||
ux_changes = []
|
||||
|
||||
`git log --pretty=format:%s #{tag}..HEAD`.each_line do |line|
|
||||
if line =~ /^(FIX|BUG|BUGFIX):/i
|
||||
bug_fixes << line
|
||||
elsif line =~ /^FEATURE:/i
|
||||
new_features << line
|
||||
elsif line =~ /^UX:/i
|
||||
ux_changes << line
|
||||
end
|
||||
end
|
||||
|
||||
puts "NEW FEATURES:", new_features, ""
|
||||
puts "BUG FIXES:", bug_fixes, ""
|
||||
puts "UX CHANGES:", ux_changes, ""
|
||||
|
||||
end
|
Loading…
Reference in New Issue
Block a user