mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Added support for a --tag argument to directly set the tag name in the header.
This commit is contained in:
parent
1235e4a5ad
commit
4f55198dca
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue