total rebase
[anni] / tools / collect-changelog
1 #!/bin/sh
2
3 collectType() {
4     local suffix="$1"
5     local header="$2"
6     local printed=0
7     for file in changelog.d/*."$suffix"; do
8         if [ '!' -f "$file" ]; then
9             continue
10         fi
11         if [ "$printed" = 0 ]; then
12             echo
13             echo "### $header"
14             printed=1
15         fi
16         # Normalize any trailing newlines/spaces, etc.
17         echo "- $(cat "$file")"
18     done
19 }
20
21 collectType security Security
22 collectType change Changed
23 collectType add Added
24 collectType fix Fixed
25 collectType remove Removed
26
27 rm changelog.d/*