Skip to content

Commit b76d27c

Browse files
committed
Added a tool for generating changelogs automatically.
Sometimes Redis patch releases are released in a matter of weeks or days one after the other. In order to have less release friction the idea is to stop writing changelogs by hand, in order to also cover everything interesting there is to say. Useless things can be deleted manually by the changelog. Also this gives more credits to contributors since often in the commit message involved people are cited even when they are not the authors of the commit.
1 parent b632f78 commit b76d27c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

utils/releasetools/changelog.tcl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env tclsh
2+
3+
if {[llength $::argv] != 2} {
4+
puts "Usage: $::argv0 <branch> <version>"
5+
exit 1
6+
}
7+
8+
set branch [lindex $::argv 0]
9+
set ver [lindex $::argv 1]
10+
11+
set template {
12+
================================================================================
13+
Redis %ver% Released %date%
14+
================================================================================
15+
16+
Upgrade urgency <URGENCY>: <DESCRIPTION>
17+
}
18+
19+
set template [string trim $template]
20+
append template "\n\n"
21+
set date [clock format [clock seconds]]
22+
set template [string map [list %ver% $ver %date% $date] $template]
23+
24+
append template [exec git log $branch~30..$branch "--format=format:+-------------------------------------------------------------------------------%n| %s%n| By %an, %ai%n+--------------------------------------------------------------------------------%nhttps://github.com/antirez/redis/commit/%H%n%n%b" --stat]
25+
26+
puts $template

0 commit comments

Comments
 (0)