summaryrefslogtreecommitdiff
path: root/scripts/lint-doc.sh
diff options
context:
space:
mode:
authorwinniehell <git@winniehell.de>2016-08-25 22:48:17 +0200
committerwinniehell <git@winniehell.de>2016-09-19 10:36:51 +0200
commit2c3b75a28c90c4bf51a3e5d4db02b44cf2480791 (patch)
treee09eb28fc2766fa1c7181972db80c66016dc6d2b /scripts/lint-doc.sh
parent62516461d695c1e684529ab1fa807b86fb7f2ab2 (diff)
downloadgitlab-ce-2c3b75a28c90c4bf51a3e5d4db02b44cf2480791.tar.gz
Add linting for duplicate CHANGELOG versions (!6039)
Diffstat (limited to 'scripts/lint-doc.sh')
-rwxr-xr-xscripts/lint-doc.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/lint-doc.sh b/scripts/lint-doc.sh
index bc6e4d94061..fb4d8463981 100755
--- a/scripts/lint-doc.sh
+++ b/scripts/lint-doc.sh
@@ -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