DEADSOFTWARE

Fix process not finishing when exited
[cavedroid.git] / gen-changelog.sh
1 #!/usr/bin/env bash
3 # Waku-2 CC BY-SA 3.0
4 # https://stackoverflow.com/a/46033999
5 # https://creativecommons.org/licenses/by-sa/3.0/
7 previous_tag=0
8 i=0
9 for current_tag in $(git tag --sort=-creatordate)
10 do
12 if [ "$previous_tag" != 0 ] && [ $i -lt 1 ]; then
13 i=$(echo "$i + 1" | bc -q )
14 tag_date=$(git log -1 --pretty=format:'%ad' --date=short ${previous_tag})
15 printf "## ${previous_tag} (${tag_date})\n\n"
16 git log ${current_tag}...${previous_tag} --pretty=format:'* %s ' --reverse | grep -v Merge
17 printf "\n\n"
18 fi
19 previous_tag=${current_tag}
20 done