changelog.tcl 1.0 KB

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env tclsh
  2. if {[llength $::argv] != 2} {
  3. puts "Usage: $::argv0 <branch> <version>"
  4. exit 1
  5. }
  6. set branch [lindex $::argv 0]
  7. set ver [lindex $::argv 1]
  8. set template {
  9. ================================================================================
  10. Redis %ver% Released %date%
  11. ================================================================================
  12. Upgrade urgency <URGENCY>: <DESCRIPTION>
  13. }
  14. set template [string trim $template]
  15. append template "\n\n"
  16. set date [clock format [clock seconds]]
  17. set template [string map [list %ver% $ver %date% $date] $template]
  18. append template [exec git log $branch~30..$branch "--format=format:%an in commit %h:%n %s" --shortstat]
  19. #Older, more verbose version.
  20. #
  21. #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]
  22. puts $template