[PATCH 1/2] Makefile.local: added checks for latest NEWS title
authorTomi Ollila <tomi.ollila@iki.fi>
Sat, 26 May 2012 15:22:24 +0000 (18:22 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:26 +0000 (09:47 -0800)
42/cc3c64384c135434bab39b100f0bc91d6ec17d [new file with mode: 0644]

diff --git a/42/cc3c64384c135434bab39b100f0bc91d6ec17d b/42/cc3c64384c135434bab39b100f0bc91d6ec17d
new file mode 100644 (file)
index 0000000..6dca9e8
--- /dev/null
@@ -0,0 +1,86 @@
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id DFB98431FC0\r
+       for <notmuch@notmuchmail.org>; Sat, 26 May 2012 08:22:17 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Sd3u7yNkHJKU for <notmuch@notmuchmail.org>;\r
+       Sat, 26 May 2012 08:22:17 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1A34D431FB6\r
+       for <notmuch@notmuchmail.org>; Sat, 26 May 2012 08:22:17 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+       id ACBE2100641; Sat, 26 May 2012 18:22:26 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/2] Makefile.local: added checks for latest NEWS title\r
+Date: Sat, 26 May 2012 18:22:24 +0300\r
+Message-Id: <1338045745-18409-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.7.1\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 26 May 2012 15:22:18 -0000\r
+\r
+Added target `verify-version-news` which checks that the first line\r
+in NEWS file has the following properties:\r
+    First word is 'Notmuch'\r
+    Second "word" matches the current version\r
+    Rest of line is in format (201[2-9]-[01][0-9]-[0-3][0-9]\r
+---\r
+\r
+Tested by executing the following commands:\r
+  make verify-version-news\r
+  make verify-version-news VERSION=0.13\r
+  make verify-version-news VERSION=0.12\r
+\r
+ Makefile.local |   15 +++++++++++++++\r
+ 1 files changed, 15 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/Makefile.local b/Makefile.local\r
+index 53b4a0d..1b34c00 100644\r
+--- a/Makefile.local\r
++++ b/Makefile.local\r
+@@ -220,6 +220,21 @@ verify-version-python: verify-version-components\r
+                echo "Please edit version and $(PV_FILE) to have consistent versions." && false)\r
+       @echo "Good."\r
+ \r
++.PHONY: verify-version-news\r
++verify-version-news: verify-version-components\r
++      @read notmuch version date < NEWS ;\\r
++      ev=0 ;\\r
++      echo -n "Checking that this is 'Notmuch' NEWS..." ;\\r
++      if [ "$$notmuch" = 'Notmuch' ]; then echo 'Good.' ;\\r
++      else echo 'No.'; ev=1; fi ;\\r
++      echo -n "Checking that NEWS version is $(VERSION)..." ;\\r
++      if [ "$$version" = '$(VERSION)' ]; then echo 'Good.' ;\\r
++      else echo 'No.'; ev=1; fi ;\\r
++      echo -n "Checking that NEWS date is in correct format..." ;\\r
++      case $$date in '('201[2-9]-[0-1][0-9]-[0-3][0-9]')') echo 'Good.' ;;\\r
++      *)   echo 'No.'; ev=1; esac ;\\r
++      if [ $$ev -ne 0 ]; then echo "Please edit NEWS file to have Notmuch header line in correct format."; false; fi\r
++\r
+ .PHONY: verify-version-components\r
+ verify-version-components:\r
+       @echo -n "Checking that $(VERSION) consists only of digits and periods..."\r
+-- \r
+1.7.1\r
+\r