Rewrite changelog generator script

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-06-30 13:24:20 +02:00
parent 6b8c236b67
commit f1ad450033

View file

@ -7,10 +7,40 @@ if [[ -z "$since" ]]; then
exit 1 exit 1
fi fi
for rev in $(git rev-list "$since"..HEAD | tac); do export GIT_PAGER=
if git notes --ref=changelog list $rev &> /dev/null; then
output=$(git notes --ref=changelog show $rev | sed '2,$s/^/ /') do_log() {
echo "* [$(echo ${rev:0:10})] $output" git log "$since"..HEAD --first-parent --oneline "$@"
fi }
done
echo " ### Major changes"
echo ""
do_log \
--merges \
--format="* (%h) %s"
echo ""
echo ""
echo " ### Fixes"
echo ""
do_log \
--grep Fix \
--format="* (%h) %s"
echo ""
echo ""
echo " ### Other "
echo ""
do_log \
--no-merges \
--grep Fix \
--invert-grep \
--format="* (%h) %s"
echo ""
echo ""
echo "Thanks to all contributors:"
# do not thank myself...
do_log --format="* %an" | sort -u | grep -v "Matthias Beyer"