changelog.tcl: get optional argument for number of commits.
This commit is contained in:
parent
8e2bbe9105
commit
4eedb0bf94
@ -1,12 +1,17 @@
|
|||||||
#!/usr/bin/env tclsh
|
#!/usr/bin/env tclsh
|
||||||
|
|
||||||
if {[llength $::argv] != 2} {
|
if {[llength $::argv] != 2 && [llength $::argv] != 3} {
|
||||||
puts "Usage: $::argv0 <branch> <version>"
|
puts "Usage: $::argv0 <branch> <version> \[<num-commits>\]"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
set branch [lindex $::argv 0]
|
set branch [lindex $::argv 0]
|
||||||
set ver [lindex $::argv 1]
|
set ver [lindex $::argv 1]
|
||||||
|
if {[llength $::argv] == 3} {
|
||||||
|
set count [lindex ::$argv 2]
|
||||||
|
} else {
|
||||||
|
set count 100
|
||||||
|
}
|
||||||
|
|
||||||
set template {
|
set template {
|
||||||
================================================================================
|
================================================================================
|
||||||
@ -21,7 +26,7 @@ append template "\n\n"
|
|||||||
set date [clock format [clock seconds]]
|
set date [clock format [clock seconds]]
|
||||||
set template [string map [list %ver% $ver %date% $date] $template]
|
set template [string map [list %ver% $ver %date% $date] $template]
|
||||||
|
|
||||||
append template [exec git log $branch~100..$branch "--format=format:%an in commit %h:%n %s" --shortstat]
|
append template [exec git log $branch~$count..$branch "--format=format:%an in commit %h:%n %s" --shortstat]
|
||||||
|
|
||||||
#Older, more verbose version.
|
#Older, more verbose version.
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user