Преглед на файлове

validate changelog dates are in descending order

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Andrew Hsu преди 8 години
родител
ревизия
6cca6bf942
променени са 3 файла, в които са добавени 14 реда и са изтрити 1 реда
  1. 1 1
      CHANGELOG.md
  2. 12 0
      hack/validate/changelog-date-descending
  3. 1 0
      hack/validate/default

+ 1 - 1
CHANGELOG.md

@@ -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

+ 12 - 0
hack/validate/changelog-date-descending

@@ -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."

+ 1 - 0
hack/validate/default

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