From c42c7f97ce632eb700828d954eb641b4adf4c6d4 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Sat, 5 Mar 2022 21:17:00 +0800 Subject: [PATCH 1/4] ci(cronet):check stable release --- .github/scripts/cronet.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/scripts/cronet.sh b/.github/scripts/cronet.sh index 4f75177c8..f50d06ec6 100644 --- a/.github/scripts/cronet.sh +++ b/.github/scripts/cronet.sh @@ -6,16 +6,13 @@ global_rematch() { echo -e "usage: global_rematch " else if [[ ! $s =~ $regex ]]; then - [[ -n $debug ]] && echo -e "input string: $s" - [[ -n $debug ]] && echo -e "input regex: $regex" echo -e "info: not matched!" fi while [[ $s =~ $regex ]]; do if [[ -n ${BASH_REMATCH[1]} ]];then - [[ -n $debug ]] && echo "待匹配:$s" + [[ -n $debug ]] && echo "${BASH_REMATCH[0]}" echo "${BASH_REMATCH[1]}" s=`echo $s | sed s/${BASH_REMATCH[1]}//g` - [[ -n $debug ]] && echo "下次匹配:$s" else echo -e "info: regex not has match group!" fi @@ -24,8 +21,18 @@ global_rematch() { } echo "start download cronet info..." -curl https://storage.googleapis.com/chromium-cronet/ -s > cronet -global_rematch 'android.([0-9\.]+).Release.VERSION' "`cat cronet`" | tail -1 > lastest_cronet_version + +##beta version +# curl https://storage.googleapis.com/chromium-cronet/ -s > cronet +# global_rematch 'android.([0-9\.]+).Release.VERSION' "`cat cronet`" | tail -1 > lastest_cronet_version + +##stable version +##fetch chrome stable release page +##https://chromereleases.googleblog.com/search/label/Stable%20updates +##match "released Chrome 98 (98.0.4758.101) for Android" +curl https://chromereleases.googleblog.com/search/label/Stable%20updates -s > stable_page +global_rematch 'released Chrome[ 0-9]+\(([0-9\.]+)\).{5}Android' "`cat stable_page`" | head -1 > lastest_cronet_version + lastest_cronet_version=`cat lastest_cronet_version` echo "lastest_cronet_version: $lastest_cronet_version" From 69b2046d0d9d794a6b11ef3430a36f625b8ba3b8 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Sat, 5 Mar 2022 21:17:59 +0800 Subject: [PATCH 2/4] ci(release):add cronet update log --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 318c440bd..b6a921f59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,11 +40,13 @@ jobs: - name: Download Lastest Cronet jar run: | echo "获取cronet最新版本" - source $GITHUB_WORKSPACE/.github/scripts/cronet.sh + source .github/scripts/cronet.sh git add *cronet*jar git add *cronet.json git add gradle.properties - git commit -m "bump cronet version: $lastest_cronet_version" + sed "15a* 更新cronet: $lastest_cronet_version" -i app/src/main/assets/updateLog.md + git add *updateLog.md + git commit -m "bump cronet version: $lastest_cronet_version" -m "changes in the [Git log](https://chromium.googlesource.com/chromium/src/+log/$current_cronet_version..$lastest_cronet_version)" git push origin master - name: Release Apk Sign From 6d93d085fd0eb2151717ca59f3f10e47bdd5ad66 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 5 Mar 2022 13:30:10 +0000 Subject: [PATCH 3/4] bump cronet version: 99.0.4844.48 changes in the [Git log](https://chromium.googlesource.com/chromium/src/+log/96.0.4664.104..99.0.4844.48) --- app/src/main/assets/cronet.json | 2 +- app/src/main/assets/updateLog.md | 1 + gradle.properties | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/assets/cronet.json b/app/src/main/assets/cronet.json index bb31c0cd2..9edfe1bf9 100644 --- a/app/src/main/assets/cronet.json +++ b/app/src/main/assets/cronet.json @@ -1 +1 @@ -{"arm64-v8a":"690c212d9bbad4b09b9e1ba450b273bb","armeabi-v7a":"4dbb88e5229abef7d84138218772f872","x86":"3f2421e040147da48abb07cfc6c7c87e","x86_64":"730a71ef4f03a27d1c8c8a77e7d09ff5","version":"96.0.4664.104"} \ No newline at end of file +{"x86":"1fdeb6068adf33655ba73e703b744b36","armeabi-v7a":"ac543f4218fe1a679e09c510583d93fa","x86_64":"4c12de088cf2c51b754ceea224bb5cc9","arm64-v8a":"99784a12b0ff18d6b7752c7488626f5b","version":"99.0.4844.48"} \ No newline at end of file diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 3b012ddbe..5a58d9332 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -13,6 +13,7 @@ **2022/03/04** +* 更新cronet: 99.0.4844.48 * 修复web端添加同步阅读配置导致的bug **2022/03/02** diff --git a/gradle.properties b/gradle.properties index 808c2c997..05eb267e7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,4 +22,4 @@ kotlin.code.style=official android.enableResourceOptimizations=true -CronetVersion=96.0.4664.104 +CronetVersion=99.0.4844.48 From 6a87f05b462a9b6315b1bf150ca57babc708bf0b Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Sat, 5 Mar 2022 21:45:56 +0800 Subject: [PATCH 4/4] ci(cronet):update updateLog.md when cronet is updated --- .github/scripts/cronet.sh | 1 + .github/workflows/release.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/cronet.sh b/.github/scripts/cronet.sh index f50d06ec6..02d980439 100644 --- a/.github/scripts/cronet.sh +++ b/.github/scripts/cronet.sh @@ -44,6 +44,7 @@ if [[ $current_cronet_version == $lastest_cronet_version ]];then echo "cronet is already latest" else sed -i s/CronetVersion=.*/CronetVersion=$lastest_cronet_version/ $path + sed "15a* 更新cronet: $lastest_cronet_version" -i $GITHUB_WORKSPACE/app/src/main/assets/updateLog.md echo "start download latest cronet" chmod +x gradlew ./gradlew app:downloadCronet diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6a921f59..dea7b5c78 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,6 @@ jobs: git add *cronet*jar git add *cronet.json git add gradle.properties - sed "15a* 更新cronet: $lastest_cronet_version" -i app/src/main/assets/updateLog.md git add *updateLog.md git commit -m "bump cronet version: $lastest_cronet_version" -m "changes in the [Git log](https://chromium.googlesource.com/chromium/src/+log/$current_cronet_version..$lastest_cronet_version)" git push origin master