Check that the underlining '===...' for first (header) line in NEWS
file is of the same length as the header text and it is all '=':s.
---
 devel/release-checks.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/devel/release-checks.sh b/devel/release-checks.sh
index d2bbc6a..c13758a 100755
--- a/devel/release-checks.sh
+++ b/devel/release-checks.sh
@@ -104,6 +104,20 @@ else
        append_emsg "Version '$py_version' is not '$VERSION' in $PV_FILE"
 fi

+echo -n "Checking that NEWS header is tidy... "
+if [ "`exec sed 's/./=/g; 1q' NEWS`" = "`exec sed '1d; 2q' NEWS`" ]
+then
+       echo Yes.
+else
+       echo No.
+       if [ "`exec sed '1d; s/=//g; 2q' NEWS`" != '' ]
+       then
+               append_emsg "Line 2 in NEWS file is not all '=':s"
+       else
+               append_emsg "Line 2 in NEWS file does not have the same length 
as line 1"
+       fi
+fi
+
 echo -n "Checking that this is Notmuch NEWS... "
 read news_notmuch news_version news_date < NEWS
 if [ "$news_notmuch" = "Notmuch" ]
-- 
1.8.1

Reply via email to