release git tag easy use

#!/usr/local/env bash

FLOW_VERSION=v2.0-rc-`date +"%Y-%m-%dT%H-%M-%S"`
echo "version: $FLOW_VERSION"

read -r -p "Are you sure? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]
then
    git tag -a $FLOW_VERSION
    echo "push to gitlab..."
    git push origin $FLOW_VERSION
    echo "well done."
else
    echo "exit."
fi
posted @ 2018-07-16 15:56  澄轶  阅读(121)  评论(0编辑  收藏  举报