Add check for duplicate issue numbers in the changelog to the release.sh script.

This commit is contained in:
Trevor Brown 2018-03-12 15:45:02 -04:00
parent 08fae99964
commit 68b6b1532c

View File

@ -73,6 +73,14 @@ if ! grep "$new_version$" CHANGELOG.md; then
exit 1 exit 1
fi fi
# Make sure the changelog doesn't contain duplicate issue numbers
nonunique_issue_numbers=$(grep -o -P '#[\d]+' CHANGELOG.md | sort)
unique_issue_numbers=$(grep -o -P '#[\d]+' CHANGELOG.md | sort -u)
if [ "$nonunique_issue_numbers" != "$unique_issue_numbers" ]; then
echo >&2 "ERROR: Duplicate issue numbers in changelog."
exit 1
fi
echo "INFO: Checking that all changes are commited and pushed" echo "INFO: Checking that all changes are commited and pushed"
git pull git pull