Stop updating README for each release

This commit is contained in:
topjohnwu 2025-06-20 00:32:11 -07:00
parent 04008949b8
commit 0860e859f7
2 changed files with 8 additions and 35 deletions

View File

@ -16,13 +16,7 @@ Some highlight features:
## Downloads ## Downloads
[Github](https://github.com/topjohnwu/Magisk/) is the only source where you can get official Magisk information and downloads. [Github](https://github.com/topjohnwu/Magisk/releases) is the only source where you can get official Magisk information and downloads.
Click the icon below to download Magisk apk.
[![](https://img.shields.io/badge/Magisk-v29.0-blue)](https://github.com/topjohnwu/Magisk/releases/tag/v29.0)
[![](https://img.shields.io/badge/Magisk%20Beta-v29.0-blue)](https://github.com/topjohnwu/Magisk/releases/tag/v29.0)
[![](https://img.shields.io/badge/Magisk-Canary-red)](https://github.com/topjohnwu/Magisk/releases/tag/canary-29001)
## Useful Links ## Useful Links

View File

@ -12,7 +12,6 @@ NOTES=notes.md
# These are constants, do not modify # These are constants, do not modify
GCONFIG=app/gradle.properties GCONFIG=app/gradle.properties
README=README.MD
BUILDCMD="./build.py -c $CONFIG" BUILDCMD="./build.py -c $CONFIG"
CWD=$(pwd) CWD=$(pwd)
@ -38,23 +37,6 @@ disable_version_config() {
sed -i "s:^version=:# version=:g" $CONFIG sed -i "s:^version=:# version=:g" $CONFIG
} }
# $1 = tag
update_readme_canary() {
sed -i "s:badge/Magisk-Canary.*:badge/Magisk-Canary-red)](https\://github.com/topjohnwu/Magisk/releases/tag/$1):g" $README
}
# $1 = tag
update_readme_beta() {
update_readme_canary $1
sed -i "s:badge/Magisk%20Beta.*:badge/Magisk%20Beta-${1}-blue)](https\://github.com/topjohnwu/Magisk/releases/tag/$1):g" $README
}
# $1 = tag
update_readme_stable() {
update_readme_beta $1
sed -i "s:badge/Magisk-v.*:badge/Magisk-${1}-blue)](https\://github.com/topjohnwu/Magisk/releases/tag/$1):g" $README
}
# $1 = tag # $1 = tag
# $2 = file name # $2 = file name
gen_link() { gen_link() {
@ -109,7 +91,6 @@ bump_canary_version() {
code=$((code + 1)) code=$((code + 1))
local tag="canary-$code" local tag="canary-$code"
sed -i "s:versionCode=.*:versionCode=${code}:g" $GCONFIG sed -i "s:versionCode=.*:versionCode=${code}:g" $GCONFIG
update_readme_canary $tag
# Commit version code changes # Commit version code changes
git add -u . git add -u .
@ -143,10 +124,8 @@ set_version() {
sed -i "1s:.*:## $(date +'%Y.%-m.%-d') Magisk v$ver:" $NOTES sed -i "1s:.*:## $(date +'%Y.%-m.%-d') Magisk v$ver:" $NOTES
if $stable; then if $stable; then
update_readme_stable $tag
update_stable_json update_stable_json
else else
update_readme_beta $tag
update_beta_json update_beta_json
fi fi
@ -215,7 +194,7 @@ upload() {
tail -n +3 $NOTES > release.md tail -n +3 $NOTES > release.md
case $type in case $type in
"canary" ) canary )
tag="canary-$code" tag="canary-$code"
title="Magisk ($ver) ($code)" title="Magisk ($ver) ($code)"
@ -225,7 +204,7 @@ upload() {
# Publish release # Publish release
gh release create --verify-tag $tag -p -t "$title" -F release.md $out/app-release.apk $out/app-debug.apk $NOTES gh release create --verify-tag $tag -p -t "$title" -F release.md $out/app-release.apk $out/app-debug.apk $NOTES
;; ;;
"beta|stable" ) beta|stable )
tag="v$ver" tag="v$ver"
title="Magisk v$ver" title="Magisk v$ver"
@ -274,10 +253,10 @@ git pull
trap disable_version_config EXIT trap disable_version_config EXIT
ensure_config ensure_config
case $1 in case $1 in
"canary" ) build_canary ;; canary ) build_canary ;;
"beta" ) build_beta $2 ;; beta ) build_beta $2 ;;
"stable" ) build_stable $2 ;; stable ) build_stable $2 ;;
"upload" ) upload $2 ;; upload ) upload $2 ;;
"revert" ) revert ;; revert ) revert ;;
* ) exit 1 ;; * ) exit 1 ;;
esac esac