* merge only annotated tag messages into release notes (#1683)
This commit is contained in:
parent
3222e6490a
commit
30b3eebabc
@ -76,11 +76,11 @@ shopt -u nocasematch
|
|||||||
#
|
#
|
||||||
# Prepare Markdown release notes:
|
# Prepare Markdown release notes:
|
||||||
#################################
|
#################################
|
||||||
#
|
# - annotated tags only, lightweight tags just display message of referred commit
|
||||||
# - tag's description:
|
# - tag's description conversion to relnotes:
|
||||||
# ignore first 3 lines - commiter, tagname, blank
|
# first 3 lines (tagname, commiter, blank): ignored
|
||||||
# first line of message: heading
|
# 4th line: relnotes heading
|
||||||
# other lines: converted to bullets
|
# remaining lines: each converted to bullet-list item
|
||||||
# empty lines ignored
|
# empty lines ignored
|
||||||
# if '* ' found as a first char pair, it's converted to '- ' to keep bulleting unified
|
# if '* ' found as a first char pair, it's converted to '- ' to keep bulleting unified
|
||||||
echo
|
echo
|
||||||
@ -90,9 +90,10 @@ echo "Tag's message:"
|
|||||||
|
|
||||||
relNotesRaw=`git show -s --format=%b $varTagName`
|
relNotesRaw=`git show -s --format=%b $varTagName`
|
||||||
readarray -t msgArray <<<"$relNotesRaw"
|
readarray -t msgArray <<<"$relNotesRaw"
|
||||||
|
|
||||||
arrLen=${#msgArray[@]}
|
arrLen=${#msgArray[@]}
|
||||||
if [ $arrLen > 3 ]; then
|
|
||||||
|
#process annotated tags only
|
||||||
|
if [ $arrLen > 3 ] && [ "${msgArray[0]:0:3}" == "tag" ]; then
|
||||||
ind=3
|
ind=3
|
||||||
while [ $ind -lt $arrLen ]; do
|
while [ $ind -lt $arrLen ]; do
|
||||||
if [ $ind -eq 3 ]; then
|
if [ $ind -eq 3 ]; then
|
||||||
@ -113,14 +114,10 @@ if [ $arrLen > 3 ]; then
|
|||||||
fi
|
fi
|
||||||
let ind=$ind+1
|
let ind=$ind+1
|
||||||
done
|
done
|
||||||
else
|
|
||||||
releaseNotes="#### Release of $varTagName"
|
|
||||||
releaseNotes+=$'\r\n'
|
|
||||||
|
|
||||||
#debug output
|
|
||||||
echo " Release of $varTagName"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "$releaseNotes"
|
||||||
|
|
||||||
# - list of commits (commits.txt must exit in the output dir)
|
# - list of commits (commits.txt must exit in the output dir)
|
||||||
commitFile=$varAssetsDir/commits.txt
|
commitFile=$varAssetsDir/commits.txt
|
||||||
if [ -s "$commitFile" ]; then
|
if [ -s "$commitFile" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user