nosqlbench/scripts/release-notes.sh

33 lines
756 B
Bash
Raw Normal View History

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
# 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
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
# 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
printf -- "- $line"
2020-05-06 12:47:59 -05:00
# printf "$line" | tee -a ${RELEASE_NOTES_FILE}
fi
done