@@ -76,11 +76,11 @@ shopt -u nocasematch
76
76
#
77
77
# Prepare Markdown release notes:
78
78
# ################################
79
- #
80
- # - tag's description:
81
- # ignore first 3 lines - commiter, tagname, blank
82
- # first line of message: heading
83
- # other lines: converted to bullets
79
+ # - annotated tags only, lightweight tags just display message of referred commit
80
+ # - tag's description conversion to relnotes :
81
+ # first 3 lines (tagname, commiter, blank): ignored
82
+ # 4th line: relnotes heading
83
+ # remaining lines: each converted to bullet-list item
84
84
# empty lines ignored
85
85
# if '* ' found as a first char pair, it's converted to '- ' to keep bulleting unified
86
86
echo
@@ -90,9 +90,10 @@ echo "Tag's message:"
90
90
91
91
relNotesRaw=` git show -s --format=%b $varTagName `
92
92
readarray -t msgArray <<< " $relNotesRaw"
93
-
94
93
arrLen=${# msgArray[@]}
95
- if [ $arrLen > 3 ]; then
94
+
95
+ # process annotated tags only
96
+ if [ $arrLen > 3 ] && [ " ${msgArray[0]: 0: 3} " == " tag" ]; then
96
97
ind=3
97
98
while [ $ind -lt $arrLen ]; do
98
99
if [ $ind -eq 3 ]; then
@@ -113,14 +114,10 @@ if [ $arrLen > 3 ]; then
113
114
fi
114
115
let ind=$ind +1
115
116
done
116
- else
117
- releaseNotes=" #### Release of $varTagName "
118
- releaseNotes+=$' \r\n '
119
-
120
- # debug output
121
- echo " Release of $varTagName "
122
117
fi
123
118
119
+ echo " $releaseNotes "
120
+
124
121
# - list of commits (commits.txt must exit in the output dir)
125
122
commitFile=$varAssetsDir /commits.txt
126
123
if [ -s " $commitFile " ]; then
0 commit comments