[PATCH v3] devel/release-checks: added checking of copyright year in documentation
authorTomi Ollila <tomi.ollila@iki.fi>
Sun, 1 Nov 2015 13:41:55 +0000 (15:41 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:58 +0000 (14:49 -0700)
39/e333c78d1b9daf5ba11f3d98c12e7b4297f921 [new file with mode: 0644]

diff --git a/39/e333c78d1b9daf5ba11f3d98c12e7b4297f921 b/39/e333c78d1b9daf5ba11f3d98c12e7b4297f921
new file mode 100644 (file)
index 0000000..c7a83cd
--- /dev/null
@@ -0,0 +1,88 @@
+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 18AFD6DE0B20\r
+ for <notmuch@notmuchmail.org>; Sun,  1 Nov 2015 05:42:09 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.146\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.146 tagged_above=-999 required=5 tests=[AWL=0.686, \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 u36DlCNSK1IP for <notmuch@notmuchmail.org>;\r
+ Sun,  1 Nov 2015 05:42:05 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 841846DE0A94\r
+ for <notmuch@notmuchmail.org>; Sun,  1 Nov 2015 05:42:05 -0800 (PST)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 217A31000B3; Sun,  1 Nov 2015 15:41:58 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Cc: tomi.ollila@iki.fi\r
+Subject: [PATCH v3] devel/release-checks: added checking of copyright year in\r
+ documentation\r
+Date: Sun,  1 Nov 2015 15:41:55 +0200\r
+Message-Id: <1446385315-20217-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 2.0.0\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 01 Nov 2015 13:42:09 -0000\r
+\r
+Check that copyright year will be current year in generated documentation.\r
+\r
+Checking is done my matching that copyright line contains current year\r
+as a substring which is good enough "approximation" in this context.\r
+---\r
+\r
+v3 of id:1440616236-17866-1-git-send-email-tomi.ollila@iki.fi\r
+changed $year to 2009-$year\r
+\r
+v2 of id:1438511187-11321-1-git-send-email-tomi.ollila@iki.fi, perhaps\r
+addressing comments in id:87r3niwan6.fsf@maritornes.cs.unb.ca\r
+\r
+ devel/release-checks.sh | 15 +++++++++++++++\r
+ 1 file changed, 15 insertions(+)\r
+\r
+diff --git a/devel/release-checks.sh b/devel/release-checks.sh\r
+index 8604a9f7d10b..5802942aa975 100755\r
+--- a/devel/release-checks.sh\r
++++ b/devel/release-checks.sh\r
+@@ -175,6 +175,21 @@ 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 in documentation contains 2009-$year... "\r
++# Read the value of variable `copyright' defined in 'doc/conf.py'.\r
++# As __file__ is not defined when python command is given from command line,\r
++# it is defined before contents of 'doc/conf.py' (which dereferences __file__)\r
++# is executed.\r
++copyrightline=`exec python -c "with open('doc/conf.py') as cf: __file__ = ''; exec(cf.read()); print(copyright)"`\r
++case $copyrightline in\r
++      *2009-$year*)\r
++              echo Yes. ;;\r
++      *)\r
++              echo No.\r
++              append_emsg "The copyright in doc/conf.py line '$copyrightline' does not contain '2009-$year'"\r
++esac\r
++\r
+ if [ -n "$emsgs" ]\r
+ then\r
+       echo\r
+-- \r
+2.0.0\r
+\r