mirror of
https://github.com/gophernicus/gophernicus.git
synced 2024-12-04 14:46:37 -05:00
30 lines
512 B
Bash
Executable File
30 lines
512 B
Bash
Executable File
#!/bin/sh
|
|
|
|
##
|
|
## Generate ChangeLog from git log
|
|
##
|
|
|
|
VERSION=`git log | grep -c "^commit"`
|
|
FIRSTVER=93
|
|
PREVIOUS=
|
|
IFS=\;
|
|
|
|
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"
|
|
|
|
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
|
|
echo
|