From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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