Fix version regex to support 4-part version numbers (e.g., 0.9.8.7)

This commit is contained in:
Claude
2025-12-11 00:53:11 +00:00
parent 234dd900f6
commit 2048ac7bc8
+2 -1
View File
@@ -8967,7 +8967,8 @@ get_latest_easy_asterisk_version() {
fi
# Extract easy-asterisk-v*.sh files and find the latest version
local latest_version=$(echo "$files_json" | grep -oP 'easy-asterisk-v\K[0-9]+\.[0-9]+\.[0-9]+(?=\.sh)' | sort -V | tail -1)
# Support both 3-part (1.2.3) and 4-part (0.9.8.7) version numbers
local latest_version=$(echo "$files_json" | grep -oP 'easy-asterisk-v\K[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?(?=\.sh)' | sort -V | tail -1)
if [ -z "$latest_version" ]; then
return 1