Update check-version.sh script

This commit is contained in:
2025-10-16 21:28:33 +03:00
parent 6f24053007
commit 978399bbf3
+4 -3
View File
@@ -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"