summaryrefslogtreecommitdiff
path: root/utils/releasetools
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2016-05-04 22:41:57 +0200
committerantirez <antirez@gmail.com>2016-05-04 22:41:57 +0200
commitb76d27ca74b7e2baadbd3d171969a44eeaeb9d1d (patch)
treeaec783e378df981957e3af9ef3039104849fd680 /utils/releasetools
parentb632f7846b97d8485ebeb2454d47000d8815eb98 (diff)
downloadredis-b76d27ca74b7e2baadbd3d171969a44eeaeb9d1d.tar.gz
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.
Diffstat (limited to 'utils/releasetools')
-rwxr-xr-xutils/releasetools/changelog.tcl26
1 files changed, 26 insertions, 0 deletions
diff --git a/utils/releasetools/changelog.tcl b/utils/releasetools/changelog.tcl
new file mode 100755
index 000000000..bf0ad999e
--- /dev/null
+++ b/utils/releasetools/changelog.tcl
@@ -0,0 +1,26 @@
+#!/usr/bin/env tclsh
+
+if {[llength $::argv] != 2} {
+ puts "Usage: $::argv0 <branch> <version>"
+ exit 1
+}
+
+set branch [lindex $::argv 0]
+set ver [lindex $::argv 1]
+
+set template {
+================================================================================
+Redis %ver% Released %date%
+================================================================================
+
+Upgrade urgency <URGENCY>: <DESCRIPTION>
+}
+
+set template [string trim $template]
+append template "\n\n"
+set date [clock format [clock seconds]]
+set template [string map [list %ver% $ver %date% $date] $template]
+
+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]
+
+puts $template