Merge pull request #314 from snowyu/feature/custom-commit-message

added custom commit message option to `git-release`
This commit is contained in:
hemanth.hm 2015-02-12 19:11:34 +05:30
commit 8750491323
2 changed files with 16 additions and 4 deletions

View file

@ -29,13 +29,17 @@ if test $# -gt 0; then
case "$1" in
-c) git-changelog -t "$version" ;;
-r) remote=$2; shift ;;
-m) msg=$2; shift ;;
--) shift; break;;
*) usage ;;
esac
shift
done
git commit -a -m "Release $version"
git tag $version -a -m "Release $version" \
if [ -z "$msg" ]; then
msg="Release ${version}"
fi
git commit -a -m "$msg"
git tag $version -a -m "$msg" \
&& git push $remote \
&& git push $remote --tags \
&& hook post-release \

View file

@ -3,11 +3,11 @@ git-release(1) -- Commit, tag and push changes to the repository
## SYNOPSIS
`git-release` <tagname> [-r <remote>] [-c]
`git-release` <tagname> [-r <remote>] [-m <commit info%gt;] [-c]
## DESCRIPTION
Commits changes with message "Release <tagname>", tags with the given <tagname> and pushes the branch / tags.
Commits changes with message "Release <tagname>" or custom commit infomation, tags with the given <tagname> and pushes the branch / tags.
Optionally it generates a changelog (see git-changelog) and a remote can be defined. The order of first -c or -r does not matter.
## OPTIONS
@ -20,6 +20,10 @@ git-release(1) -- Commit, tag and push changes to the repository
The "remote" repository that is destination of a push operation: it is passed to git push.
-m <commit info>
use the custom commit infomation instead of the default message "Release <tagname>" .
-c
Generates or populates the changelog with all commit message since the last tag. For more info see git-changelog..
@ -30,6 +34,10 @@ git-release(1) -- Commit, tag and push changes to the repository
$ git release 0.1.0
* Release commit with the given <tagname> and custom commit message.
$ git release 0.1.0 -m "+ powerful feature added."
* Release commit with the given <tagname> and push to specific remote.
$ git release 0.1.0 -r github