liblog4cxx: Fix auto-update
Closes https://github.com/termux/termux-packages/pull/14294 %ci:no-build
This commit is contained in:
parent
05c6a747fe
commit
8bf061f70f
|
@ -12,3 +12,16 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||||
"
|
"
|
||||||
TERMUX_PKG_AUTO_UPDATE=true
|
TERMUX_PKG_AUTO_UPDATE=true
|
||||||
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"
|
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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue