mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-21 00:42:56 +00:00
fix(main/vim,x11/vim-gtk): ensure base 10 handling of patch versions
%ci:no-build
This commit is contained in:
@@ -55,8 +55,11 @@ termux_pkg_auto_update() {
|
||||
# remember to apply that change to the other as well.
|
||||
local latest_tag current_patch latest_patch
|
||||
latest_tag="$(termux_github_api_get_tag)"
|
||||
latest_patch="${latest_tag##*.}"
|
||||
current_patch="${TERMUX_PKG_VERSION##*.}"
|
||||
# Specify Base 10 with the `10#` prefix.
|
||||
# This is necessary to suppress automatic interpretation
|
||||
# of the value as octal when there is a leading 0.
|
||||
latest_patch="10#${latest_tag##*.}"
|
||||
current_patch="10#${TERMUX_PKG_VERSION##*.}"
|
||||
|
||||
# Vim releases nearly every commit as a new tag.
|
||||
# To avoid auto update spam, we only update Vim every 50th patch.
|
||||
@@ -69,7 +72,8 @@ termux_pkg_auto_update() {
|
||||
return
|
||||
fi
|
||||
|
||||
termux_pkg_upgrade_version "${latest_tag%.*}.${latest_patch}"
|
||||
# Pad the patch component of the version back to 4 digits in accordance with Vim's tag naming.
|
||||
termux_pkg_upgrade_version "$(printf '%s.%04d' "${latest_tag%.*}" "${latest_patch}")"
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
|
||||
@@ -55,8 +55,11 @@ termux_pkg_auto_update() {
|
||||
# remember to apply that change to the other as well.
|
||||
local latest_tag current_patch latest_patch
|
||||
latest_tag="$(termux_github_api_get_tag)"
|
||||
latest_patch="${latest_tag##*.}"
|
||||
current_patch="${TERMUX_PKG_VERSION##*.}"
|
||||
# Specify Base 10 with the `10#` prefix.
|
||||
# This is necessary to suppress automatic interpretation
|
||||
# of the value as octal when there is a leading 0.
|
||||
latest_patch="10#${latest_tag##*.}"
|
||||
current_patch="10#${TERMUX_PKG_VERSION##*.}"
|
||||
|
||||
# Vim releases nearly every commit as a new tag.
|
||||
# To avoid auto update spam, we only update Vim every 50th patch.
|
||||
@@ -69,7 +72,8 @@ termux_pkg_auto_update() {
|
||||
return
|
||||
fi
|
||||
|
||||
termux_pkg_upgrade_version "${latest_tag%.*}.${latest_patch}"
|
||||
# Pad the patch component of the version back to 4 digits in accordance with Vim's tag naming.
|
||||
termux_pkg_upgrade_version "$(printf '%s.%04d' "${latest_tag%.*}" "${latest_patch}")"
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
|
||||
Reference in New Issue
Block a user