From 978399bbf360c58803cc0a12fa564806d7f01ba0 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Thu, 16 Oct 2025 21:28:33 +0300 Subject: [PATCH] Update check-version.sh script --- check-version.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/check-version.sh b/check-version.sh index bbe20ba..a609407 100644 --- a/check-version.sh +++ b/check-version.sh @@ -1,8 +1,9 @@ #!/bin/bash -URL="https://www.cpan.org/src/README.html" +# Get version using the MetaCPAN Rest API +VERSION=$(curl -s -L https://fastapi.metacpan.org/download_url/perl | jq -r '.release') -# Get version number from website -VERSION=$(curl -s -L "$URL" | grep -A2 'class="latest"' | tail -n1 | grep -o -E '[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}') +# Trim prefix +VERSION=${VERSION//perl-/} echo "$VERSION"