fix scripts/updates/check-updates.sh

Again issues with epoch splitting.
This commit is contained in:
Leonid Pliushch 2021-01-03 00:00:40 +02:00
parent 386a0e4f72
commit 972e012060
No known key found for this signature in database
GPG Key ID: 45F2964132545795
1 changed files with 6 additions and 1 deletions

View File

@ -30,8 +30,13 @@ if [ -f "${BASEDIR}/github-projects.txt" ]; then
# Our local version of package.
termux_version=$(set +e +u;. "${BASEDIR}/../../packages/${package}/build.sh" 2>/dev/null; echo "$TERMUX_PKG_VERSION")
termux_epoch="$(echo "$termux_version" | cut -d: -f1)"
[ -n "$termux_epoch" ] && termux_epoch+=":"
termux_version=$(echo "$termux_version" | cut -d: -f2-)
if [ "$termux_version" == "$termux_epoch" ]; then
# No epoch set.
termux_epoch=""
else
termux_epoch+=":"
fi
# Latest version is the current release tag on Github.
latest_version=$(curl --silent -H "Authorization: token ${GITHUB_API_TOKEN}" "https://api.github.com/repos/${project}/releases/latest" | jq -r .tag_name)