3 changelogFile=${1:-CHANGELOG.md}
5 if [ ! -r "$changelogFile" ]; then
6 echo "Unable to read file $changelogFile" >&2
10 grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2
12 echo "Congratulations! Changelog $changelogFile dates are in descending order."