[postgis-tickets] [SCM] PostGIS branch master updated. 1378b633371931709bc10d2a08bfe12bd6f55afd

git at osgeo.org git at osgeo.org
Thu Dec 19 01:10:07 PST 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  1378b633371931709bc10d2a08bfe12bd6f55afd (commit)
      from  4dc5be03ba4864446738ff3db2a400e4fddc24e6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1378b633371931709bc10d2a08bfe12bd6f55afd
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Dec 19 10:09:09 2019 +0100

    Add tester script for NEWS file, add to testsuite
    
    The check runs with `check-news` Makefile target which is also
    run as part of `check` target.

diff --git a/GNUmakefile.in b/GNUmakefile.in
index 9aba0d0..865ee2d 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -39,7 +39,10 @@ clean-local:
 # TODO: drop 'test' target..
 test: check
 
-check: check-no-trailing-blanks check-unit check-regress docs-check
+check: check-no-trailing-blanks check-unit check-regress docs-check check-news
+
+check-news:
+	utils/check_news.sh
 
 check-unit check-regress docs-check: all
 
diff --git a/utils/check_news.sh b/utils/check_news.sh
new file mode 100755
index 0000000..bac8f6f
--- /dev/null
+++ b/utils/check_news.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+RD=`dirname $0`/.. # root source dir
+
+VERBOSE=no
+
+if test "$1" = "-v"; then
+  VERBOSE=yes
+fi
+
+# Extract dates from NEWS file and check they
+# are sorted correctly
+pdate=$(date '+%Y/%m/%d') # most recent timestamp
+prel=Unreleased
+grep -B1 '^[0-9]\{4\}/[0-9]\{2\}/[0-9]\{2\}' ${RD}/NEWS |
+  while read rel; do
+    read date
+    read sep
+    ts=$( date -d "${date}" '+%s' )
+    pts=$( date -d "${pdate}" '+%s' )
+    if test $ts -gt $pts; then
+      echo "${rel} (${date}) appears after earlier published release ${prel}"
+      exit 1
+    fi
+    if test "${VERBOSE}" = yes; then
+      echo "${rel} (${date}) before ${prel} (${pdate})"
+    fi
+    pts=${ts}
+    prel=${rel}
+  done
+
+echo "NEWS file entries are in good order"
+
+exit 0

-----------------------------------------------------------------------

Summary of changes:
 GNUmakefile.in      |  5 ++++-
 utils/check_news.sh | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100755 utils/check_news.sh


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list