]> git.notmuchmail.org Git - notmuch/commitdiff
devel/release-checks.sh: added check that 1st NEWS header is tidy
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 30 Jan 2013 15:01:35 +0000 (17:01 +0200)
committerDavid Bremner <bremner@debian.org>
Tue, 19 Feb 2013 00:28:49 +0000 (20:28 -0400)
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.

-- extra execs removed by db.

devel/release-checks.sh

index d2bbc6a06d077f7f57c6bab8713fc6f30e55bf02..4eff1a7fd9a78f6a9a0e29d3e5773d80a8c99f1d 100755 (executable)
@@ -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" ]