fix(libmsgpack{,-cxx}): check name of tag before auto updating
upstream uses 'c-' and 'cpp-' prefix in tag name to distinguish release, but both releases are from same repository, so auto update system confuses release of one package to be of another. Now we explicitly check tag name before auto-updating. %ci:no-build Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This commit is contained in:
parent
783e639db1
commit
d5d6af6090
@ -8,3 +8,17 @@ TERMUX_PKG_SRCURL=https://github.com/msgpack/msgpack-c/releases/download/cpp-${T
|
||||
TERMUX_PKG_SHA256=9b3c1803b9855b7b023d7f181f66ebb0d6941275ba41d692037e0aa27736443f
|
||||
TERMUX_PKG_DEPENDS="boost"
|
||||
TERMUX_PKG_BUILD_DEPENDS="boost-headers"
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+\.\d+\.\d+"
|
||||
|
||||
termux_pkg_auto_update() {
|
||||
# Get latest release tag:
|
||||
local tag
|
||||
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}")"
|
||||
# check if this is not a c release:
|
||||
if grep -qP "^cpp-${TERMUX_PKG_UPDATE_VERSION_REGEXP}$" <<<"$tag"; then
|
||||
termux_pkg_upgrade_version "$tag"
|
||||
else
|
||||
echo "WARNING: Skipping auto-update of ${TERMUX_PKG_NAME}: Not a cpp release($tag)"
|
||||
fi
|
||||
}
|
||||
|
@ -14,3 +14,15 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DMSGPACK_BUILD_EXAMPLES=OFF
|
||||
-DMSGPACK_BUILD_TESTS=OFF
|
||||
"
|
||||
|
||||
termux_pkg_auto_update() {
|
||||
# Get latest release tag:
|
||||
local tag
|
||||
tag="$(termux_github_api_get_tag "${TERMUX_PKG_SRCURL}")"
|
||||
# check if this is not a c++ release:
|
||||
if grep -qP "^c-${TERMUX_PKG_UPDATE_VERSION_REGEXP}$" <<<"$tag"; then
|
||||
termux_pkg_upgrade_version "$tag"
|
||||
else
|
||||
echo "WARNING: Skipping auto-update of ${TERMUX_PKG_NAME}: Not a C release($tag)"
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user