fix(neovim-nightly): version extraction
%ci:no-build Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This commit is contained in:
parent
3031f1377e
commit
ff67d7b744
@ -50,19 +50,22 @@ termux_pkg_auto_update() {
|
|||||||
|
|
||||||
if [ -z "$remote_nvim_version" ]; then
|
if [ -z "$remote_nvim_version" ]; then
|
||||||
echo "ERROR: No version found in nightly page."
|
echo "ERROR: No version found in nightly page."
|
||||||
exit 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
remote_nvim_version="$(grep -qP '^\d+\.\d+\.\d+-dev\+\d+-g[0-9a-f]+$' <<<"$remote_nvim_version" || true)"
|
remote_nvim_version="$(grep -oP '^\d+\.\d+\.\d+-dev\+\d+-g[0-9a-f]+$' <<<"$remote_nvim_version" || true)"
|
||||||
|
|
||||||
if [ -z "$remote_nvim_version" ]; then
|
if [ -z "$remote_nvim_version" ]; then
|
||||||
echo "WARNING: Version in nightly page is not in expected format. Skipping auto-update."
|
echo "WARNING: Version in nightly page is not in expected format. Skipping auto-update."
|
||||||
echo "remote_nvim_version: $remote_nvim_version"
|
echo "remote_nvim_version: $remote_nvim_version"
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# since we are using a nightly build, therefore no need to check for version increment/decrement.
|
# since we are using a nightly build, therefore no need to check for version increment/decrement.
|
||||||
if [ "${TERMUX_PKG_VERSION}" != "${remote_nvim_version}" ]; then
|
if [ "${TERMUX_PKG_VERSION}" != "${remote_nvim_version}" ]; then
|
||||||
termux_pkg_upgrade_version "${remote_nvim_version}" --skip-version-check
|
termux_pkg_upgrade_version "${remote_nvim_version}" --skip-version-check
|
||||||
|
else
|
||||||
|
echo "INFO: No update available."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user