From 63096c841e7af1d56ab298634f30c18edc35cdca Mon Sep 17 00:00:00 2001 From: Yan-Luca L Date: Mon, 24 Jun 2024 19:02:29 +0200 Subject: [PATCH] Update entrypoint.sh --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index be78169..2874d32 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,7 +11,7 @@ VERSION_NAME="${INPUT_VERSION_NAME:-REVIEWDOG_VERSION}" # Get current version. # NOTE: Go to https://regex101.com/r/t1JcmL/13 To see the current regex in action. -CURRENT_VERSION=$(grep -oP "${VERSION_NAME}(?:\s*=\s*|:?\s*)[\"|\']?v?\K\d+\.\d+(\.\d+)(\.\d+)?(-[^\'\"\s]*)?" "${FILE}" | head -n1) +CURRENT_VERSION=$(grep -oP "${VERSION_NAME}(?:\s*=\s*|:?\s*)[\"|\']?v?\K\d+\.\d+\.\d+\.\d+\.?(-[^\'\"\s]*)?" "${FILE}" | head -n1) if [ -z "${CURRENT_VERSION}" ]; then echo "cannot parse ${VERSION_NAME}" exit 1