feat(entrypoint.sh): support four digit version numbers
This commit is contained in:
@@ -11,7 +11,7 @@ VERSION_NAME="${INPUT_VERSION_NAME:-REVIEWDOG_VERSION}"
|
|||||||
|
|
||||||
# Get current version.
|
# Get current version.
|
||||||
# NOTE: Go to https://regex101.com/r/t1JcmL/13 To see the current regex in action.
|
# 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+)?(-[^\'\"\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
|
if [ -z "${CURRENT_VERSION}" ]; then
|
||||||
echo "cannot parse ${VERSION_NAME}"
|
echo "cannot parse ${VERSION_NAME}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user