Commit 01814dd 1 parent fa17c4e commit 01814dd Copy full SHA for 01814dd
File tree 2 files changed +17
-37
lines changed
2 files changed +17
-37
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -17,11 +17,25 @@ set -e
17
17
18
18
cd ../../
19
19
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
+
20
34
git pull --tags
21
35
# shellcheck disable=SC2046
22
36
# 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 } "
26
40
27
41
git push origin --tags
You can’t perform that action at this time.
0 commit comments