From 68b6b1532c33116eee34a11e57910cce3e4a4fda Mon Sep 17 00:00:00 2001 From: Trevor Brown Date: Mon, 12 Mar 2018 15:45:02 -0400 Subject: [PATCH] Add check for duplicate issue numbers in the changelog to the release.sh script. --- release.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/release.sh b/release.sh index 565f9036..c925a5b6 100755 --- a/release.sh +++ b/release.sh @@ -73,6 +73,14 @@ if ! grep "$new_version$" CHANGELOG.md; then exit 1 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" git pull