fix: Better version management

This commit is contained in:
Sayantan Santra 2023-08-06 16:10:51 -05:00
parent 6df146dd82
commit 8231d104fa
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
2 changed files with 3 additions and 3 deletions

View file

@ -129,7 +129,7 @@ if [[ $2 != buildonly ]]; then
# shellcheck disable=SC2086,SC2046
[[ $name == microg.apk ]] && download_link="https://github.com/$repo/releases/latest/download/$name" || download_link="$(echo "$data" | jq -r '.browser_download_url')"
curl -sLo "$name" "$download_link"
jq ".\"$basename\" = \"$version\"" versions-new.json >versions.json.tmp && mv versions.json.tmp versions-new.json
jq ".\"$basename\" = \"$version\"" versions-new.json >versions-tmp.json && mv versions-tmp.json versions-new.json
echo "Upgraded $basename from $version_present to $version"
flag=true
fi

View file

@ -83,7 +83,7 @@ dl_yt() {
declare -r dl_url=$(dl_apkpure "$version" $appname youtube)
echo "YouTube version: $version"
echo "downloaded from: [APKMirror - YouTube]($dl_url)"
jq ".\"$apk\" = \"$version\"" versions.json >versions.json.tmp && mv versions.json.tmp versions.json
jq ".\"$apk\" = \"$version\"" versions.json >versions-tmp.json && mv versions-tmp.json versions-new.json
}
# Downloading youtube music
@ -106,7 +106,7 @@ dl_ytm() {
dl_apkpure "$version" $appname youtube-music
echo "YouTube Music version: $version"
echo "downloaded from: [APKMirror - YouTube Music]($dl_url)"
jq ".\"$apk\" = \"$version\"" versions.json >versions.json.tmp && mv versions.json.tmp versions.json
jq ".\"$apk\" = \"$version\"" versions.json >versions-tmp.json && mv versions-tmp.json versions-new.json
}
# Get into the build directory