check-updates.sh: return meaningful error when failed to get the latest version

This commit is contained in:
Leonid Pliushch 2021-09-22 18:03:27 +03:00
parent 0354a09676
commit 404a4f5cfe
No known key found for this signature in database
GPG Key ID: 45F2964132545795

View File

@ -49,6 +49,11 @@ if [ -f "${BASEDIR}/github-projects.txt" ]; then
latest_version=$(grep -oP "$version_regexp" <<< "$latest_version")
fi
if [ -z "$latest_version" ]; then
echo "Failed to get latest version for '${package}'."
exit 1
fi
# Translate "_" into ".".
latest_version=${latest_version//_/.}