Permalink
Browse files

Generated ChangeLog now shows rolling release versions

  • Loading branch information...
kimholviala committed Jan 29, 2018
1 parent c1ea262 commit fcd025d4e0722dfbe110a2f496221cc5f2c62a8e
Showing with 10 additions and 1 deletion.
  1. +10 −1 git2changelog
@@ -4,6 +4,8 @@
## Generate ChangeLog from git log
##
VERSION=`git log | grep -c "^commit"`
FIRSTVER=93
PREVIOUS=
IFS=\;
@@ -12,8 +14,15 @@ echo "[ Automatically generated from git log ]"
git log --pretty=tformat:"%ad %an <%ae>;%s" --date=short | \
while read -r AUTHOR COMMENT; do
[ "$AUTHOR" != "$PREVIOUS" ] && printf "\n$AUTHOR\n\n"
printf "\t* %s\n" "$COMMENT"
if [ $VERSION -ge $FIRSTVER ]; then
printf "\t* (v%d) %s\n" $VERSION "$COMMENT"
else
printf "\t* %s\n" "$COMMENT"
fi
PREVIOUS="$AUTHOR"
VERSION=$(( VERSION - 1 ))
done
echo

0 comments on commit fcd025d

Please sign in to comment.