github.com/jiasir/docker@v1.3.3-0.20170609024000-252e610103e7/hack/validate/changelog-date-descending (about)

     1  #!/usr/bin/env bash
     2  
     3  changelogFile=${1:-CHANGELOG.md}
     4  
     5  if [ ! -r "$changelogFile" ]; then
     6    echo "Unable to read file $changelogFile" >&2
     7    exit 1
     8  fi
     9  
    10  grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2
    11  
    12  echo "Congratulations!  Changelog $changelogFile dates are in descending order."