fix v prefix support

This commit is contained in:
haya14busa
2020-01-20 16:44:00 +00:00
parent 5cb4f43aa8
commit cab989f6f3

View File

@@ -10,7 +10,7 @@ REPO="${INPUT_REPO:-reviewdog/reviewdog}"
VERSION_NAME="${INPUT_VERSION_NAME:-REVIEWDOG_VERSION}" VERSION_NAME="${INPUT_VERSION_NAME:-REVIEWDOG_VERSION}"
# Get current version. # Get current version.
CURRENT_VERSION=$(grep -oP "${VERSION_NAME}(=|:?\s+)\v?\K\d+\.\d+\.\d+" "${FILE}" | head -n1) CURRENT_VERSION=$(grep -oP "${VERSION_NAME}(=|:?\s+)v?\K\d+\.\d+\.\d+" "${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