From 4f55198dca14224a38ff0029876b20296f95c5de Mon Sep 17 00:00:00 2001 From: Phally Date: Sat, 5 May 2012 12:35:42 +0200 Subject: [PATCH] Added support for a --tag argument to directly set the tag name in the header. --- bin/git-changelog | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/git-changelog b/bin/git-changelog index d305cc2..6bf1455 100755 --- a/bin/git-changelog +++ b/bin/git-changelog @@ -2,12 +2,17 @@ FILE="" LIST=false +TAG="n.n.n" while [ "$1" != "" ]; do case $1 in -l | --list ) LIST=true ;; + -t | --tag ) + TAG=$2 + shift + ;; * ) FILE=$1 ;; @@ -16,7 +21,7 @@ while [ "$1" != "" ]; do done DATE=`date +'%Y-%m-%d'` -HEAD="\nn.n.n / $DATE \n==================\n\n" +HEAD="\n$TAG / $DATE \n==================\n\n" if $LIST; then version=$(git describe --tags --abbrev=0 $(git rev-list --tags --max-count=1))