config/scripts/tag_add.sh

17 lines
221 B
Bash
Raw Normal View History

2019-05-17 12:49:42 +02:00
#!/bin/bash
REMOTE=$(git remote)
BRANCH=$(git branch | grep '*' | sed 's/* //')
TAG=$1
MSG=$2
if [ $# -eq 0 ]; then
echo 'Missing parameters'
exit 0
fi
git tag -a $TAG -m "$MSG"
git push $REMOTE --tags
exit 0