liblog4cxx: Fix auto-update

Closes https://github.com/termux/termux-packages/pull/14294

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2023-01-03 04:34:23 +09:00
parent 05c6a747fe
commit 8bf061f70f
1 changed files with 13 additions and 0 deletions

View File

@ -12,3 +12,16 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
"
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+\.\d+\.\d+"
termux_pkg_auto_update() {
# Get the newest tag:
local tag
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}" "${TERMUX_PKG_UPDATE_TAG_TYPE}")"
# check if this is not a release:
if grep -qP "^rel/v${TERMUX_PKG_UPDATE_VERSION_REGEXP}\$" <<<"$tag"; then
termux_pkg_upgrade_version "$tag"
else
echo "WARNING: Skipping auto-update: Not a release($tag)"
fi
}