|
36 | 36 | # policies, either expressed or implied, of Vincent Driessen. |
37 | 37 | # |
38 | 38 |
|
39 | | -require_git_repo |
40 | | -require_gitflow_initialized |
41 | | -gitflow_load_settings |
42 | | -VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`") |
43 | | -PREFIX=$(git config --get gitflow.prefix.hotfix) |
| 39 | +init() { |
| 40 | + require_git_repo |
| 41 | + require_gitflow_initialized |
| 42 | + gitflow_load_settings |
| 43 | + VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`") |
| 44 | + PREFIX=$(git config --get gitflow.prefix.hotfix) |
| 45 | +} |
44 | 46 |
|
45 | 47 | usage() { |
46 | 48 | echo "usage: git flow hotfix [list] [-v]" |
@@ -221,6 +223,7 @@ cmd_finish() { |
221 | 223 | DEFINE_boolean sign false "sign the release tag cryptographically" s |
222 | 224 | DEFINE_string signingkey "" "use the given GPG-key for the digital signature (implies -s)" u |
223 | 225 | DEFINE_string message "" "use the given tag message" m |
| 226 | + DEFINE_string messagefile "" "use the contents of the given file as tag message" f |
224 | 227 | DEFINE_boolean push false "push to $ORIGIN after performing finish" p |
225 | 228 | DEFINE_boolean keep false "keep branch after performing finish" k |
226 | 229 | DEFINE_boolean notag false "don't tag this release" n |
@@ -269,6 +272,7 @@ cmd_finish() { |
269 | 272 | flag sign && opts="$opts -s" |
270 | 273 | [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" |
271 | 274 | [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" |
| 275 | + [ "$FLAGS_messagefile" != "" ] && opts="$opts -F '$FLAGS_messagefile'" |
272 | 276 | eval git tag $opts "$VERSION_PREFIX$VERSION" || \ |
273 | 277 | die "Tagging failed. Please run finish again to retry." |
274 | 278 | fi |
|
0 commit comments