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
原文地址:https://www.cnblogs.com/suanec/p/9318086.html