[PATCH] devel/release-checks: added checking of copyright year in documentation
authorTomi Ollila <tomi.ollila@iki.fi>
Sun, 2 Aug 2015 10:26:27 +0000 (13:26 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:14 +0000 (14:49 -0700)
93/8861fce457b8b6a4c09ac6f5f57d7f0b0e4478 [new file with mode: 0644]

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