Skip to content

Commit ccc325a

Browse files
committed
Add a 'changes.sh' script to generate a CHANGES.txt which helps in the Release Notes.
1 parent 8d7c5fb commit ccc325a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@
1919
# Gradle
2020
**/.gradle
2121
**/build/
22+
23+
/CHANGES.txt

changes.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
#
3+
# This script writes the changelog in a human-readable format.
4+
#
5+
# You'll probably want to edit manually the result of executing the script.
6+
#
7+
if [[ $# -eq 0 ]] ; then
8+
echo "No version supplied (e.g. '4.0.0')"
9+
exit 1
10+
fi
11+
OLDTAG=`git tag -l --merged master --sort=-taggerdate|head -1`
12+
echo "Writing changes from tag $OLDTAG"
13+
TITLE="XML-DTD CHANGES"
14+
VERHDR="Version ${1}"
15+
OUTFILE="CHANGES.txt"
16+
echo -en "${TITLE}\\r\\n${TITLE//?/=}\\r\\n\\r\\n${VERHDR}\\r\\n${VERHDR//?/-}\\r\\n\\r\\n">${OUTFILE}
17+
git log --reverse --pretty=format:%s ${OLDTAG}..|sed -e 's/^/- /'|fold -s|sed -r 's/^([^-])/ \1/'|sed -e 's/$/\r/'>>${OUTFILE}
18+
echo -en "\\n">>${OUTFILE}

0 commit comments

Comments
 (0)