Add linting for duplicate CHANGELOG versions (!6039)

This commit is contained in:
winniehell 2016-08-25 22:48:17 +02:00
parent 62516461d6
commit 2c3b75a28c
1 changed files with 9 additions and 0 deletions

View File

@ -10,6 +10,15 @@ then
exit 1
fi
# Ensure that the CHANGELOG does not contain duplicate versions
DUPLICATE_CHANGELOG_VERSIONS=$(grep --extended-regexp '^v [0-9.]+' CHANGELOG | sed 's| (unreleased)||' | sort | uniq -d)
if [ "${DUPLICATE_CHANGELOG_VERSIONS}" != "" ]
then
echo '✖ ERROR: Duplicate versions in CHANGELOG:' >&2
echo "${DUPLICATE_CHANGELOG_VERSIONS}" >&2
exit 1
fi
echo "✔ Linting passed"
exit 0