2020-05-06 12:47:59 -05:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
2021-12-22 22:15:23 -06:00
|
|
|
git log --oneline --decorate --max-count=1000 > /tmp/gitlog.txt
|
2020-05-06 13:23:38 -05:00
|
|
|
|
2021-12-22 22:15:23 -06:00
|
|
|
readarray lines < /tmp/gitlog.txt
|
2020-05-06 12:47:59 -05:00
|
|
|
for line in "${lines[@]}"
|
|
|
|
do
|
2023-01-25 22:10:17 -06:00
|
|
|
# printf "line: %s\n" "${line}"
|
2023-01-23 21:18:53 -06:00
|
|
|
if [[ $line =~ \(tag:\ ([a-zA-z0-9]+-)?[0-9]+\.[0-9]+\.[0-9]+\)-preview.+ ]]
|
|
|
|
then
|
2023-01-25 22:10:17 -06:00
|
|
|
true
|
|
|
|
# echo "PREVIEW"
|
2023-01-23 21:18:53 -06:00
|
|
|
elif [[ $line =~ \(tag:\ ([a-zA-Z0-9]+-)?[0-9]+\.[0-9]+\.[0-9]+\).+ ]]
|
2020-05-06 13:32:45 -05:00
|
|
|
then
|
2023-01-25 22:10:17 -06:00
|
|
|
# echo "RELEASE"
|
2020-05-06 13:32:45 -05:00
|
|
|
# printf "no more lines after $line" 1>&2
|
|
|
|
break
|
2020-05-06 12:47:59 -05:00
|
|
|
elif [[ $line =~ \[maven-release-plugin\] ]]
|
2020-05-06 13:32:45 -05:00
|
|
|
then
|
|
|
|
# printf "maven release plugin, skipping: $line\n" 1>&2
|
|
|
|
continue
|
|
|
|
elif [[ $line =~ "Merge" ]]
|
|
|
|
then
|
2021-04-02 11:12:39 -05:00
|
|
|
printf -- "- $line"
|
2020-05-06 13:32:45 -05:00
|
|
|
# printf "merge info, skipping: $line" 1>&2
|
|
|
|
continue
|
2020-05-06 12:47:59 -05:00
|
|
|
else
|
2020-06-01 00:36:45 -05:00
|
|
|
printf -- "- $line"
|
2020-05-06 12:47:59 -05:00
|
|
|
# printf "$line" | tee -a ${RELEASE_NOTES_FILE}
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|