Browse Source

Include changelog annotation message

Annotation message is meant as official release note, so including it
there makes sense.

(For example, GitHub will use it to create release note under Releases tab.)
Alois Mahdal 8 years ago
parent
commit
99ff8e5296
1 changed files with 18 additions and 1 deletions
  1. 18
    1
      src/include/release.sh

+ 18
- 1
src/include/release.sh View File

99
     set -e
99
     set -e
100
     debug_var newtag
100
     debug_var newtag
101
     $MKIT_DRY && return
101
     $MKIT_DRY && return
102
-    git tag -m "$(ini 1value project:name) $newtag - $(ini 1value project:codename)" "$newtag"
102
+    git tag -m "$(_release_msg)" "$newtag"
103
 
103
 
104
     reldst=$(ini 1value project:reldst)
104
     reldst=$(ini 1value project:reldst)
105
     debug_var reldst
105
     debug_var reldst
109
     fi
109
     fi
110
 }
110
 }
111
 
111
 
112
+_release_msg() {
113
+    #
114
+    # Generate message for annotated tag
115
+    #
116
+    # The last commit before issuing a release must be "Bump version" commit
117
+    # suggested by _vbump_gitmsg() and  manually edited by user.  Since the
118
+    # commit contains changelog, this function just uses the message body.
119
+    #
120
+    # The sort message (first line) is replaced with a nicer one (with project
121
+    # name, codename and version).
122
+    #
123
+    echo "$(ini 1value project:name) $newtag - $(ini 1value project:codename)"
124
+    echo
125
+    git show -s --format=%B \
126
+      | tail -n +3
127
+}
128
+
112
 _vbump() {
129
 _vbump() {
113
     local rlevel="$1"
130
     local rlevel="$1"
114
     local nextver   # after the bump
131
     local nextver   # after the bump