Skip to content

Commit 34f7c25

Browse files
committed
auto find the latest tag.
1 parent 85ada21 commit 34f7c25

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

download-pre.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ EDITION=$1
2121
PLAT=$2
2222
VER=$3
2323

24-
if test -z $VER ;then
25-
VER='V1.0-50fc6d2'
26-
fi
27-
2824
if test -z $PLAT ;then
2925
PLAT='all'
3026
fi
@@ -33,9 +29,9 @@ cd $(dirname "$0")
3329
c_dir="$PWD"
3430

3531
function usage() {
36-
echo " useage:"
37-
echo "download precompiled ijk or github edition."
38-
echo " $0 ijk|github [ios|macos|all] [<release tag>]"
32+
echo "=== useage ===================="
33+
echo "Download precompiled ijk or github edition libs from github,The usage is as follows:"
34+
echo "$0 ijk|github [ios|macos|all] [<release tag>]"
3935
}
4036

4137
function download() {
@@ -66,6 +62,11 @@ if [[ "$PLAT" != 'ios' && "$PLAT" != 'macos' && "$PLAT" != 'all' ]]; then
6662
exit
6763
fi
6864

65+
if test -z $VER ;then
66+
VER=$(git describe --abbrev=0 --tag | awk -F - '{printf "%s-%s",$1,$2}')
67+
echo "auto find the latest tag:${VER}"
68+
fi
69+
6970
if [[ "$PLAT" == 'ios' || "$PLAT" == 'macos' ]]; then
7071
download $PLAT
7172
elif [[ "$PLAT" == 'all' ]]; then

0 commit comments

Comments
 (0)