Merge pull request #9 from haya14busa/fix-v

fix v prefix support
This commit is contained in:
haya14busa
2020-01-21 01:45:29 +09:00
committed by GitHub

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