File tree Expand file tree Collapse file tree 1 file changed +28
-9
lines changed Expand file tree Collapse file tree 1 file changed +28
-9
lines changed Original file line number Diff line number Diff line change 33set -e
44
55# rtt=$GIT_BRANCH_IMAGE_VERSION
6- # rb=$(git rev-parse --abbrev-ref HEAD)
6+ rb=$( git rev-parse --abbrev-ref HEAD)
77rc=$( git rev-parse --short HEAD)
88currtag=$( git describe --tags ` git rev-list --tags --max-count=1` )
9+ currbra=$rb
910echo 000---$currtag
1011
1112./init-ios.sh
@@ -46,19 +47,37 @@ git commit -m "tencentyun/iot-ijkplayer@$rc"
4647git push https://$GIT_ACCESS_TOKEN @github.com/tencentyun/iot-thirdparty-ios.git
4748
4849# ==========此处添加版本自增逻辑,如果是持续集成发snapshot,最新tag+1;如果是发布就发branch
50+ vtag=${currtag#* v}
51+ echo $vtag
52+
53+
54+ branch=${currbra#* v}
55+ vbranch=${branch% x* } 0
56+ echo $vbranch
57+
58+ function version_ge() { test " $( echo " $@ " | tr " " " \n" | sort -rV | head -n 1) " == " $1 " ; }
59+
60+ resultvv=$vbranch
61+ if version_ge $vtag $vbranch ; then
62+
63+ echo " $vtag is greater than or equal to $vbranch "
64+
65+ vtaglist=(${vtag// ./ } )
66+
67+ firsttag=${vtaglist[0]}
68+ secondtag=${vtaglist[1]}
69+ thirdtag=${vtaglist[2]}
70+ thirdtag=` expr $thirdtag + 1`
71+
72+ resultvv=$firsttag .$secondtag .$thirdtag
73+ fi
4974
50- temptag=$( git describe --tags ` git rev-list --tags --max-count=1` )
51- vtaglist=(${temptag// -/ } )
52- beta=${vtaglist[1]}
53- version=${vtaglist[0]}
54- resultvv=${version#* v}
5575echo " -->>$resultvv "
5676
5777if [ $1 == ' Debug' ]; then
58- git tag " $resultvv -beta.$poddatetime "
78+ git tag " ijkplayer-v $resultvv -beta.$poddatetime "
5979else
60- vtag=${currtag#* v}
61- git tag " $vtag "
80+ git tag " ijkplayer-v$vtag "
6281fi
6382# ==========此处添加版本自增逻辑,如果是持续集成发snapshot,最新tag+1;如果是发布就发branch
6483
You can’t perform that action at this time.
0 commit comments