From 9df4c7f57b61fce1676aadfc8aece076398be2cc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 2 Oct 2018 22:41:41 -0700 Subject: Added tools/changelog-helper.sh. --- tools/changelog-helper.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 tools/changelog-helper.sh (limited to 'tools') diff --git a/tools/changelog-helper.sh b/tools/changelog-helper.sh new file mode 100755 index 000000000..dfaefa483 --- /dev/null +++ b/tools/changelog-helper.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# generate preliminary list of changes since changelog +# was last modified + +lastmod=`git log -n2 --format=oneline changelog | awk '{print $1;}'` +#git log --format=oneline $starthash..HEAD +files=`git ls-tree -r master --name-only` +for x in $files +do + commits=`git log -n1 $lastmod..HEAD $x` + if [[ ! -z $commits ]] + then + if echo $x | grep -q "src\/.*\.hs" + then + file=`echo $x | sed -e 's/src\///' | sed -e 's/\//\./g' | sed -e 's/\.hs$//'` + else + file=$x + fi + echo " * $file" + GIT_PAGER=cat git log --pretty=format:'%n%w(78,4,6)+ %s (%an)%n%n%w(78,6,6)%b%n' $lastmod..HEAD $x + fi +done + -- cgit v1.2.3