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