Skip to content

Commit

Permalink
Added a tool for generating changelogs automatically.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
antirez committed May 4, 2016
1 parent b632f78 commit b76d27c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions utils/releasetools/changelog.tcl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b76d27c

Please sign in to comment.