config/scripts/tag_add.sh
2019-05-17 12:50:01 +02:00

17 lines
221 B
Bash
Executable File

#!/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