Skip to content

Commit

Permalink
check git tag by azure ci variables
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed May 20, 2019
1 parent 08660e3 commit 6e21424
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions ci/build_aar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,11 @@ cp ${JNI_BUILD_DIR}/dabnn/jni/libdabnn-jni.so ci/android_aar/dabnn/src/main/jniL

# Increase version code and update version name

echo "Build source branch: $BUILD_SOURCEBRANCH"

if (($# == 0)); then
ret=0; tag=`git describe --exact-match --tags` || ret=$?
if [ $ret != 0 ]; then
echo "HEAD is not tagged, skip deploy aar"
exit 0
fi
# tag is expected to be something like "v0.2", so remove the leading "v"
if [[ `echo $tag | cut -c -1` == "v" ]]; then
ver=`echo $tag | cut -c 2-10`
if [[ $BUILD_SOURCEBRANCH == refs/tags/v* ]]; then
ver=`echo $BUILD_SOURCEBRANCH | cut -c 12-`
else
echo "HEAD is not tagged as a version, skip deploy aar"
exit 0
Expand Down

0 comments on commit 6e21424

Please sign in to comment.