validate changelog dates are in descending order

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
This commit is contained in:
Andrew Hsu 2017-01-23 19:19:35 -08:00
Родитель 929ae4a0b6
Коммит 6cca6bf942
3 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@ -5,7 +5,7 @@ information on the list of deprecated flags and APIs please have a look at
https://docs.docker.com/engine/deprecated/ where target removal dates can also
be found.
## 1.13.0 (2016-12-08)
## 1.13.0 (2017-01-18)
**IMPORTANT**: In Docker 1.13, the managed plugin api changed, as compared to the experimental
version introduced in Docker 1.12. You must **uninstall** plugins which you installed with Docker 1.12

Просмотреть файл

@ -0,0 +1,12 @@
#!/bin/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."

Просмотреть файл

@ -15,3 +15,4 @@ export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. $SCRIPTDIR/toml
. $SCRIPTDIR/vet
. $SCRIPTDIR/changelog-well-formed
. $SCRIPTDIR/changelog-date-descending