[PATCH v2] devel/release-checks: added checking of copyright year in documentation
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 26 Aug 2015 19:10:36 +0000 (22:10 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:25 +0000 (14:49 -0700)
db/12f04e80f68efdafaa18f2cbb6093f79242e92 [new file with mode: 0644]

diff --git a/db/12f04e80f68efdafaa18f2cbb6093f79242e92 b/db/12f04e80f68efdafaa18f2cbb6093f79242e92
new file mode 100644 (file)
index 0000000..405780d
--- /dev/null
@@ -0,0 +1,85 @@
+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 697416DE0B29\r
+ for <notmuch@notmuchmail.org>; Wed, 26 Aug 2015 12:12:11 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.259\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.259 tagged_above=-999 required=5 tests=[AWL=0.799, \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 PQVtxiVwKLl8 for <notmuch@notmuchmail.org>;\r
+ Wed, 26 Aug 2015 12:12:08 -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 925016DE0350\r
+ for <notmuch@notmuchmail.org>; Wed, 26 Aug 2015 12:12:08 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id C46101000E6; Wed, 26 Aug 2015 22:10:37 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2] devel/release-checks: added checking of copyright year in\r
+ documentation\r
+Date: Wed, 26 Aug 2015 22:10:36 +0300\r
+Message-Id: <1440616236-17866-1-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 2.0.0\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: Wed, 26 Aug 2015 19:12:11 -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
+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 $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
++      *$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