Skip to content

Commit 659dd43

Browse files
committed
Add a changes.sh script to create a CHANGES.txt file
1 parent ba3199b commit 659dd43

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
@@ -5,5 +5,7 @@
55
*/bin/
66
**/build/
77
/.idea
8+
/.vscode/
89
/.gradle
910
/buildSrc/.gradle
11+
/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. '1.1.6')"
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="Web-APIs 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/^/- /'|sed -e 's/$/./'|fold -s|sed -r 's/^([^-])/ \1/'|sed -e 's/$/\r/'>>${OUTFILE}
18+
echo -en "\\n">>${OUTFILE}

0 commit comments

Comments
 (0)