From 5d4c942609f604d3061340242c8adaa7035dd469 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Mon, 13 Mar 2023 21:34:18 +0800 Subject: [PATCH] [skip ci] --- .github/scripts/cronet.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/scripts/cronet.sh b/.github/scripts/cronet.sh index acaf9d504..123b6f4da 100644 --- a/.github/scripts/cronet.sh +++ b/.github/scripts/cronet.sh @@ -1,11 +1,15 @@ #!/usr/bin/env bash +#分支Stable Dev Beta branch=$1 +#api 最大偏移 +max_offset=$2 + [ -z $1 ] && branch=Stable +[ -z $2 ] && branch=S3 [ -z $GITHUB_ENV ] && echo "Error: Unexpected github workflow environment" && exit offset=0 -max_offset=3 function fetchExitVersion() { # 获取最新cronet版本 @@ -23,9 +27,9 @@ function checkVersionExit() { if [ $statusCode == "404" ];then echo "storage.googleapis.com return 404 for cronet $lastest_cronet_version" if [[ $max_offset > $offset ]]; then + offset=$(expr $offset + 1) echo "retry with offset $offset" fetchVersion - offset=$(expr $offset + 1) else exist fi