修复 RssHub 无法匹配问题

Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
新疆萌森软件开发工作室 2024-10-18 11:39:53 +08:00
parent 5b3d401a73
commit 0205e9c3b2

View File

@ -28,14 +28,13 @@ process_image() {
echo "Trimmed version: $trimmed_version" echo "Trimmed version: $trimmed_version"
# Remove any suffixes (like -ffmpeg) for versioning purposes # Remove any suffixes (like -ffmpeg) for versioning purposes
cleaned_version=$(echo $trimmed_version | grep -oE '^[0-9]+(\.[0-9]+){0,4}') cleaned_version=$(echo "$trimmed_version" | grep -oE '[0-9]+(\.[0-9]+){0,4}')
echo "Cleaned version: $cleaned_version" echo "Cleaned version: $cleaned_version"
# Handle special versions with dates and other formats # Handle special versions with dates and other formats
if [[ -z "$cleaned_version" && "$trimmed_version" =~ ^RELEASE\.[0-9]{4}-[0-9]{2}-[0-9]{2} ]]; then if [[ -z "$cleaned_version" ]]; then
# Handle minio version format RELEASE.YYYY-MM-DDTHH-MM-SSZ cleaned_version=$(echo "$trimmed_version" | grep -oE '[0-9]{4}-[0-9]{2}-[0-9]{2}')
cleaned_version=$(echo $trimmed_version | grep -oE '[0-9]{4}-[0-9]{2}-[0-9]{2}')
fi fi
echo "Final version: $cleaned_version" echo "Final version: $cleaned_version"