fix(main/rust-analyzer): custom auto update (#18670)

[no ci]
This commit is contained in:
Jia Yuan Lo 2023-12-12 10:15:59 +08:00 committed by GitHub
parent 273ef02d5c
commit f04d8b9fb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ termux_pkg_auto_update() {
local api_url_r=$(curl -s "${api_url}")
local r1=$(echo "${api_url_r}" | jq .[].name | sed -e 's|\"||g')
local latest_tag=$(echo "${r1}" | sed -nE 's/^([0-9]*-)/\1/p' | sort | tail -n1)
local latest_version=${latest_tag:0:4}-${latest_tag:4:2}-${latest_tag:6:2}
# https://github.com/termux/termux-packages/issues/18667
local latest_version=${latest_tag:0:4}${latest_tag:5:2}${latest_tag:8:2}
if [[ "${latest_version}" == "${TERMUX_PKG_VERSION}" ]]; then
echo "INFO: No update needed. Already at version '${TERMUX_PKG_VERSION}'."
return