From 0e06a87f3bc5fa85e20882730bc635a3b9b4b0be Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sun, 2 Aug 2015 13:26:27 +0300 Subject: [PATCH] [PATCH] devel/release-checks: added checking of copyright year in documentation --- 93/8861fce457b8b6a4c09ac6f5f57d7f0b0e4478 | 80 +++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 93/8861fce457b8b6a4c09ac6f5f57d7f0b0e4478 diff --git a/93/8861fce457b8b6a4c09ac6f5f57d7f0b0e4478 b/93/8861fce457b8b6a4c09ac6f5f57d7f0b0e4478 new file mode 100644 index 000000000..7263306e7 --- /dev/null +++ b/93/8861fce457b8b6a4c09ac6f5f57d7f0b0e4478 @@ -0,0 +1,80 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 47F0B6DE19FB + for ; Sun, 2 Aug 2015 03:26:50 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.314 +X-Spam-Level: +X-Spam-Status: No, score=0.314 tagged_above=-999 required=5 tests=[AWL=0.854, + RP_MATCHES_RCVD=-0.55, T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id nWAKnADGwWV1 for ; + Sun, 2 Aug 2015 03:26:48 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id 87B666DE19E7 + for ; Sun, 2 Aug 2015 03:26:48 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id B8DB010009D; Sun, 2 Aug 2015 13:26:33 +0300 (EEST) +From: Tomi Ollila +To: notmuch@notmuchmail.org +Subject: [PATCH] devel/release-checks: added checking of copyright year in + documentation +Date: Sun, 2 Aug 2015 13:26:27 +0300 +Message-Id: <1438511187-11321-1-git-send-email-tomi.ollila@iki.fi> +X-Mailer: git-send-email 2.0.0 +In-Reply-To: <1438508905-10955-1-git-send-email-tomi.ollila@iki.fi> +References: <1438508905-10955-1-git-send-email-tomi.ollila@iki.fi> +Cc: tomi.ollila@iki.fi +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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: Sun, 02 Aug 2015 10:26:50 -0000 + +Check that copyright year will be current year in generated documentation. + +The checking is done my matching that copyright line contains current +year as a substring which is good enough "approximation" in this context. +--- + devel/release-checks.sh | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/devel/release-checks.sh b/devel/release-checks.sh +index bf0d68a444b6..b655a5089e12 100755 +--- a/devel/release-checks.sh ++++ b/devel/release-checks.sh +@@ -207,6 +207,18 @@ case $news_date in + append_emsg "Date '$news_date' in NEWS file is not in format (yyyy-mm-dd)" + esac + ++year=`exec date +%Y` ++echo -n "Checking that copyright line in documentation contains $year... " ++copyrightline=`exec python -c "__file__ = 'command-line' ++with open('doc/conf.py') as cf: exec(cf.read()); print(copyright)"` ++case $copyrightline in ++ *$year*) ++ echo Yes. ;; ++ *) ++ echo No. ++ append_emsg "The copyright in doc/conf.py line '$copyrightline' does not contain '$year'" ++esac ++ + if [ -n "$emsgs" ] + then + echo +-- +2.0.0 + -- 2.26.2