unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH v3] devel/release-checks: added checking of copyright year in documentation
@ 2015-11-01 13:41 Tomi Ollila
  2015-11-19 11:55 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: Tomi Ollila @ 2015-11-01 13:41 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

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.
---

v3 of id:1440616236-17866-1-git-send-email-tomi.ollila@iki.fi
changed $year to 2009-$year

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 2009-$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
+	*2009-$year*)
+		echo Yes. ;;
+	*)
+		echo No.
+		append_emsg "The copyright in doc/conf.py line '$copyrightline' does not contain '2009-$year'"
+esac
+
 if [ -n "$emsgs" ]
 then
 	echo
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3] devel/release-checks: added checking of copyright year in documentation
  2015-11-01 13:41 [PATCH v3] devel/release-checks: added checking of copyright year in documentation Tomi Ollila
@ 2015-11-19 11:55 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2015-11-19 11:55 UTC (permalink / raw)
  To: Tomi Ollila, notmuch; +Cc: tomi.ollila

Tomi Ollila <tomi.ollila@iki.fi> writes:

> 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.

Pushed.

d

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-19 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-01 13:41 [PATCH v3] devel/release-checks: added checking of copyright year in documentation Tomi Ollila
2015-11-19 11:55 ` David Bremner

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).