reg/vendor/github.com/docker/docker-ce/components/engine/hack/validate/changelog-date-descending
Jess Frazelle 843aebf2c1
update deps
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-07-14 11:48:41 -04:00

13 lines
306 B
Bash
Executable file

#!/usr/bin/env bash
changelogFile=${1:-CHANGELOG.md}
if [ ! -r "$changelogFile" ]; then
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."