File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,11 +17,25 @@ set -e
1717
1818cd ../../
1919
20+ type=" "
21+
22+ if ` git status | grep " develop" & > /dev/null` ; then
23+ type=" develop"
24+ fi
25+ if ` git status | grep " release" & > /dev/null` ; then
26+ type=" release"
27+ fi
28+ if [[ ${type} == " " ]]; then
29+ echo -e " This branch doesn't support tagging, please switch to the \033[31mdevelop\033[0m or \033[31mrelease\033[0m branch."
30+ exit
31+ fi
32+
33+
2034git pull --tags
2135# shellcheck disable=SC2046
2236# shellcheck disable=SC2116
23- develop_tag =$( echo dc3.develop .$( date +' %Y%m%d' ) .$( git tag -l " dc3.develop .$( date +' %Y%m%d' ) .*" | wc -l | xargs printf ' %02d' ) )
24- echo " ${develop_tag } "
25- git tag " ${develop_tag } "
37+ tag =$( echo dc3.${type} .$( date +' %Y%m%d' ) .$( git tag -l " dc3.${type} .$( date +' %Y%m%d' ) .*" | wc -l | xargs printf ' %02d' ) )
38+ echo " ${tag } "
39+ git tag " ${tag } "
2640
2741git push origin --tags
You can’t perform that action at this time.
0 commit comments