2017-02-13 19:01:54 +00:00
|
|
|
#!/usr/bin/env bash
|
2017-01-24 03:19:35 +00:00
|
|
|
|
|
|
|
changelogFile=${1:-CHANGELOG.md}
|
|
|
|
|
2019-01-10 01:23:38 +00:00
|
|
|
if [ ! -r "$changelogFile" ]; then
|
2019-08-02 13:58:33 +00:00
|
|
|
echo "Unable to read file $changelogFile" >&2
|
|
|
|
exit 1
|
2017-01-24 03:19:35 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2
|
|
|
|
|
|
|
|
echo "Congratulations! Changelog $changelogFile dates are in descending order."
|