fix(watchexec): check tag name before update

upstream has releases with `lib-*` tag within same repo

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This commit is contained in:
Aditya Alok 2022-04-05 23:48:57 +05:30
parent ae0caf3bd5
commit 47b24412a6
No known key found for this signature in database
GPG Key ID: 345AE134142077D8
1 changed files with 13 additions and 0 deletions

View File

@ -10,6 +10,19 @@ TERMUX_PKG_UPDATE_VERSION_REGEXP="\d+\.\d+\.\d+"
TERMUX_PKG_DEPENDS="zlib"
TERMUX_PKG_BUILD_IN_SRC=true
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: We nned this check since upstream has multiple different
# releases within same repo. (i.e for c and cxx)
if grep -qP "^cli-v${TERMUX_PKG_UPDATE_VERSION_REGEXP}\$" <<<"$tag"; then
termux_pkg_upgrade_version "$tag"
else
echo "WARNING: Skipping auto-update: Not a cli release($tag)"
fi
}
termux_step_make_install() {
termux_setup_rust
cargo install \