mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-28 05:32:35 +00:00
fix(scripts/termux_setup_treesitter): fix auto-update
- missed variable name mismatch when introduced in #25008
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/tree-sitter/tree-sitter
|
||||
TERMUX_PKG_HOMEPAGE=https://tree-sitter.github.io/
|
||||
TERMUX_PKG_DESCRIPTION="An incremental parsing system for programming tools"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="Joshua Kahn @TomJo2000"
|
||||
TERMUX_PKG_VERSION="0.25.10"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=ad5040537537012b16ef6e1210a572b927c7cdc2b99d1ee88d44a7dcdc3ff44c
|
||||
TERMUX_PKG_BREAKS="libtreesitter"
|
||||
TERMUX_PKG_REPLACES="libtreesitter"
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
TERMUX_PKG_UPDATE_VERSION_REGEXP="^\d+\.\d+\.\d+$"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_pkg_auto_update() {
|
||||
@@ -20,12 +22,18 @@ termux_pkg_auto_update() {
|
||||
return
|
||||
fi
|
||||
|
||||
if ! grep -oP "${TERMUX_PKG_UPDATE_VERSION_REGEXP}" <<< "${latest_release}"; then
|
||||
echo "INFO: Tag '${latest_release}' does not look like a stable version."
|
||||
return
|
||||
fi
|
||||
|
||||
# Do not forget to bump revision of reverse dependencies and rebuild them
|
||||
# after SOVERSION is changed.
|
||||
local _SOVERSION=0.25
|
||||
|
||||
# This blocks auto-updates to an incompatible SO version.
|
||||
if [[ "${latest_release}" != "${_SOVERSION}".* ]]; then
|
||||
echo "Latest release is '${latest_release}'" >&2
|
||||
termux_error_exit "SOVERSION guard check failed."
|
||||
fi
|
||||
|
||||
@@ -37,7 +45,7 @@ termux_pkg_auto_update() {
|
||||
NEW_TS_SHA256=$(sha256sum "$TS_TMPFILE" | cut -d' ' -f1)
|
||||
|
||||
sed \
|
||||
-e "s|\(^\s*\)local TERMUX_TREE_SITTER_SHA256=[0-9a-f]*|\1local TS_GZ_SHA256=${NEW_TS_SHA256}|" \
|
||||
-e "s|\(^\s*\)local TERMUX_TREE_SITTER_SHA256=[0-9a-f]*|\1local TERMUX_TREE_SITTER_SHA256=${NEW_TS_SHA256}|" \
|
||||
-i "${TERMUX_SCRIPTDIR}/scripts/build/setup/termux_setup_treesitter.sh"
|
||||
|
||||
termux_pkg_upgrade_version "${latest_release}"
|
||||
|
||||
Reference in New Issue
Block a user