Merge pull request #1688 from Xwite/master

check stable release of cronet
pull/1689/head
kunfei 3 years ago committed by GitHub
commit 9fd96c1709
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      .github/scripts/cronet.sh
  2. 5
      .github/workflows/release.yml
  3. 2
      app/src/main/assets/cronet.json
  4. 1
      app/src/main/assets/updateLog.md
  5. 2
      gradle.properties

@ -6,16 +6,13 @@ global_rematch() {
echo -e "usage: global_rematch <regex> <string> <debug flag>"
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"
@ -37,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

@ -40,11 +40,12 @@ 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"
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

@ -1 +1 @@
{"x86":"9299ba13b7a4b89926a8fd1252acac24","armeabi-v7a":"f652ed38e2f23ba2a3e5484ef9369e78","x86_64":"76665854c4b927c87d82d09d9e726654","arm64-v8a":"96078052641b271fae90aa26ed1dbb45","version":"100.0.4847.0"}
{"x86":"1fdeb6068adf33655ba73e703b744b36","armeabi-v7a":"ac543f4218fe1a679e09c510583d93fa","x86_64":"4c12de088cf2c51b754ceea224bb5cc9","arm64-v8a":"99784a12b0ff18d6b7752c7488626f5b","version":"99.0.4844.48"}

@ -18,6 +18,7 @@
**2022/03/04**
* 更新cronet: 99.0.4844.48
* 修复web端添加同步阅读配置导致的bug
**2022/03/02**

@ -22,4 +22,4 @@ kotlin.code.style=official
android.enableResourceOptimizations=true
CronetVersion=100.0.4847.0
CronetVersion=99.0.4844.48

Loading…
Cancel
Save