Skip to content

Commit 30b3eeb

Browse files
pacucha42me-no-dev
authored andcommitted
* merge only annotated tag messages into release notes (#1683)
1 parent 3222e64 commit 30b3eeb

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

Diff for: tools/deploy.sh

+10-13
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ shopt -u nocasematch
7676
#
7777
# Prepare Markdown release notes:
7878
#################################
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
8484
# empty lines ignored
8585
# if '* ' found as a first char pair, it's converted to '- ' to keep bulleting unified
8686
echo
@@ -90,9 +90,10 @@ echo "Tag's message:"
9090

9191
relNotesRaw=`git show -s --format=%b $varTagName`
9292
readarray -t msgArray <<<"$relNotesRaw"
93-
9493
arrLen=${#msgArray[@]}
95-
if [ $arrLen > 3 ]; then
94+
95+
#process annotated tags only
96+
if [ $arrLen > 3 ] && [ "${msgArray[0]:0:3}" == "tag" ]; then
9697
ind=3
9798
while [ $ind -lt $arrLen ]; do
9899
if [ $ind -eq 3 ]; then
@@ -113,14 +114,10 @@ if [ $arrLen > 3 ]; then
113114
fi
114115
let ind=$ind+1
115116
done
116-
else
117-
releaseNotes="#### Release of $varTagName"
118-
releaseNotes+=$'\r\n'
119-
120-
#debug output
121-
echo " Release of $varTagName"
122117
fi
123118

119+
echo "$releaseNotes"
120+
124121
# - list of commits (commits.txt must exit in the output dir)
125122
commitFile=$varAssetsDir/commits.txt
126123
if [ -s "$commitFile" ]; then

0 commit comments

Comments
 (0)