unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Cc: tomi.ollila@iki.fi
Subject: [PATCH v2] devel/release-checks: added checking of copyright year in documentation
Date: Wed, 26 Aug 2015 22:10:36 +0300	[thread overview]
Message-ID: <1440616236-17866-1-git-send-email-tomi.ollila@iki.fi> (raw)

Check that copyright year will be current year in generated documentation.

Checking is done my matching that copyright line contains current year
as a substring which is good enough "approximation" in this context.
---

v2 of id:1438511187-11321-1-git-send-email-tomi.ollila@iki.fi, perhaps
addressing comments in id:87r3niwan6.fsf@maritornes.cs.unb.ca

 devel/release-checks.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/devel/release-checks.sh b/devel/release-checks.sh
index 8604a9f7d10b..5802942aa975 100755
--- a/devel/release-checks.sh
+++ b/devel/release-checks.sh
@@ -175,6 +175,21 @@ 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 in documentation contains $year... "
+# Read the value of variable `copyright' defined in 'doc/conf.py'.
+# As __file__ is not defined when python command is given from command line,
+# it is defined before contents of 'doc/conf.py' (which dereferences __file__)
+# is executed.
+copyrightline=`exec python -c "with open('doc/conf.py') as cf: __file__ = ''; 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

                 reply	other threads:[~2015-08-26 19:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440616236-17866-1-git-send-email-tomi.ollila@iki.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).