-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathrelNotes
executable file
·27 lines (25 loc) · 1.04 KB
/
relNotes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Generates release notes (to go into HISTORY.md).
# Usage:
# relNotes
#
# If you require release notes since a specific commit (such as the
# commit of the last release), specify this commit as first argument:
# relNotes abc123
# The range of commits. All commits if there is no first argument,
# or commits since a given point.
[[ -z ${1} ]] && range="" || range=${1}^..HEAD
git log --abbrev-commit ${range} --pretty=format:'* %s' -- ${2} |
sed -e '
s!\(http.*\), !<a href="\1">#xxx</a>, !;
s!\(CALCITE-[0-9]*\)!<a href="https://issues.apache.org/jira/browse/\1">\1</a>!;
s!\(MOREL-\([0-9]*\)\)!<a href="https://github.com/hydromatic/morel/issues/\2">\1</a>!;
s!\(QUIDEM-\([0-9]*\)\)!<a href="https://github.com/hydromatic/quidem/issues/\2">\1</a>!;
s!\(SMLJ-\([0-9]*\)\)!<a href="https://github.com/hydromatic/morel/issues/\2">\1</a>!;
s!\(SQLLINE-\([0-9]*\)\)!<a href="https://github.com/julianhyde/sqlline/issues/\2">\1</a>!;
s!</a>\]!</a>]\
!;' |
fold -s -81 |
sed -e 's/ *$//' |
grep '[^ ]' |
gawk '!/^\* / && !/^ / {print " " $0;next} {print}'
# End