Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
9a6fa7d0
Commit
9a6fa7d0
authored
Oct 10, 2018
by
antirez
Browse files
changelog.tcl: get optional argument for number of commits.
parent
101e419f
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/releasetools/changelog.tcl
View file @
9a6fa7d0
#!/usr/bin/env tclsh
if
{[
llength $::argv
]
!= 2
}
{
puts
"Usage:
$::argv0
<branch> <version>"
if
{[
llength $::argv
]
!= 2
&&
[
llength $::argv
]
!= 3
}
{
puts
"Usage:
$::argv0
<branch> <version>
\[
<num-commits>
\]
"
exit 1
}
set branch
[
lindex $::argv 0
]
set ver
[
lindex $::argv 1
]
if
{[
llength $::argv
]
== 3
}
{
set count
[
lindex ::$argv 2
]
}
else
{
set count 100
}
set template
{
================================================================================
...
...
@@ -21,7 +26,7 @@ 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~
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.
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment