Skip to content

Commit

Permalink
Merge branch 'master' of github.com:axel-download-accelerator/axel
Browse files Browse the repository at this point in the history
  • Loading branch information
eribertomota committed Sep 17, 2017
2 parents c9de007 + ba0c6ce commit abf3f1d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions mkchangelog
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ get_ver() {
git describe --abbrev=0 --tags --match 'v*' "$@"
}

if [ "$1" = -h -o $# = 0 ]; then
cat >/dev/stderr <<-!
Usage: $0 version [commit]
!
exit 1
fi

set -- "$@" HEAD
cur="$(get_ver "$1")"
prev="$(get_ver "$cur^")"

git shortlog --format='* %s' -w80,0 "$prev".."$cur" |
prev="$(get_ver "$2")"

git shortlog --format='* %s' -w80,0 "$prev".."$2" |
awk '
!/^\*/ && /:$/ {
$NF=""
Expand All @@ -20,7 +27,7 @@ awk '
print author, ">", $0
}
' | sort |
awk -vver="${cur#v}" -F' > ' '
awk -vver="$1" -F' > ' '
BEGIN {
printf "Version: %s, %s\n", ver, strftime("%Y-%m-%d")
}
Expand Down

0 comments on commit abf3f1d

Please sign in to comment.