Browse code

validate changelog dates are in descending order

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>

Andrew Hsu authored on 2017/01/24 12:19:35
Showing 3 changed files
... ...
@@ -5,7 +5,7 @@ information on the list of deprecated flags and APIs please have a look at
5 5
 https://docs.docker.com/engine/deprecated/ where target removal dates can also
6 6
 be found.
7 7
 
8
-## 1.13.0 (2016-12-08)
8
+## 1.13.0 (2017-01-18)
9 9
 
10 10
 **IMPORTANT**: In Docker 1.13, the managed plugin api changed, as compared to the experimental
11 11
 version introduced in Docker 1.12. You must **uninstall** plugins which you installed with Docker 1.12
12 12
new file mode 100755
... ...
@@ -0,0 +1,12 @@
0
+#!/bin/bash
1
+
2
+changelogFile=${1:-CHANGELOG.md}
3
+
4
+if [ ! -r "$changelogFile" ]; then
5
+  echo "Unable to read file $changelogFile" >&2
6
+  exit 1
7
+fi
8
+
9
+grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2
10
+
11
+echo "Congratulations!  Changelog $changelogFile dates are in descending order."
... ...
@@ -15,3 +15,4 @@ export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
15 15
 . $SCRIPTDIR/toml
16 16
 . $SCRIPTDIR/vet
17 17
 . $SCRIPTDIR/changelog-well-formed
18
+. $SCRIPTDIR/changelog-date-descending