Browse Source

Do not break with long releases

If release contains many commits and/or those commits contain many
changed files, the command line could grow past OS limit.  Using stdin
avoids this.
Alois Mahdal 7 years ago
parent
commit
faf44ea6cb
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/include/release.sh

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

142
     #
142
     #
143
     local rlevel=$1     # bump level (x, y or z)
143
     local rlevel=$1     # bump level (x, y or z)
144
     local nextver       # version after the bump
144
     local nextver       # version after the bump
145
+    local cache         # cache for the message
145
     __relck git_present
146
     __relck git_present
146
     __relck at_relsrc
147
     __relck at_relsrc
147
     __relck not_dirty
148
     __relck not_dirty
152
       || die "failed to update version in mkit.ini"
153
       || die "failed to update version in mkit.ini"
153
     git add mkit.ini \
154
     git add mkit.ini \
154
       || die "failed to add mkit.ini to the index"
155
       || die "failed to add mkit.ini to the index"
155
-    git commit -e -m "$(_vbump_gitmsg)"
156
+    cache=$(mktemp -t "mkit._vbump_gitmsg.XXXXXXXX")
157
+    _vbump_gitmsg > "$cache"
158
+    git commit -e -F "$cache"   # note: reading from stdin will break vim
159
+    rm "$cache"
156
 }
160
 }
157
 
161
 
158
 _vbump_gitmsg() {
162
 _vbump_gitmsg() {