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