From 9fe0d8cbf5cbb169c0bd0e326d62dd7e2a3bdf17 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Tue, 10 Sep 2013 15:52:56 +0200 Subject: [PATCH] Added script to create changelog from http://binarystatic.wordpress.com/2010/02/18/how-to-convert-git-log-to-changelog/ --- scripts/create_changelog.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/create_changelog.sh diff --git a/scripts/create_changelog.sh b/scripts/create_changelog.sh new file mode 100755 index 00000000000..d6ff1f473bd --- /dev/null +++ b/scripts/create_changelog.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# Convert git log to GNU-style ChangeLog file. +# (C) Chris +if test -d ".git"; then + git log --date-order --date=short | \ + sed -e '/^commit.*$/d' | \ + awk '/^Author/ {sub(/\\$/,""); getline t; print $0 t; next}; 1' | \ + sed -e 's/^Author: //g' | \ + sed -e 's/>Date: \([0-9]*-[0-9]*-[0-9]*\)/>\t\1/g' | \ + sed -e 's/^\(.*\) \(\)\t\(.*\)/\3 \1 \2/g' > ChangeLog + exit 0 +else + echo "No git repository present." + exit 1 +fi