From 54fd21a755247fbb230c456ea34f63ccfa88ef89 Mon Sep 17 00:00:00 2001 From: Jonhnny Weslley Date: Wed, 24 Nov 2010 10:16:53 -0300 Subject: [PATCH] Use annotated tags to release commits instead of lightweight tags --- bin/git-release | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/bin/git-release b/bin/git-release index 2be3b85..91fe9fd 100755 --- a/bin/git-release +++ b/bin/git-release @@ -1,12 +1,10 @@ #!/bin/sh -if test $# -gt 0; then - echo "... releasing $1" - git commit -a -m "Release $1" \ - && git tag "$1" \ - && git push \ - && git push --tags \ - && echo "... complete" -else - echo "tag required" && exit 1 -fi +tagname=$1 + +test -z $tagname && echo "tag required" && exit 1 + +echo "... releasing $1" +git tag -a "$1" -m "Release $1" \ + && git push --tags \ + && echo "... complete"