From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Cc: tomi.ollila@iki.fi
Subject: [PATCH] devel/release-checks: added checking of copyright year in documentation
Date: Sun, 2 Aug 2015 13:26:27 +0300 [thread overview]
Message-ID: <1438511187-11321-1-git-send-email-tomi.ollila@iki.fi> (raw)
In-Reply-To: <1438508905-10955-1-git-send-email-tomi.ollila@iki.fi>
Check that copyright year will be current year in generated documentation.
The checking is done my matching that copyright line contains current
year as a substring which is good enough "approximation" in this context.
---
devel/release-checks.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/devel/release-checks.sh b/devel/release-checks.sh
index bf0d68a444b6..b655a5089e12 100755
--- a/devel/release-checks.sh
+++ b/devel/release-checks.sh
@@ -207,6 +207,18 @@ 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 line in documentation contains $year... "
+copyrightline=`exec python -c "__file__ = 'command-line'
+with open('doc/conf.py') as cf: 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
next prev parent reply other threads:[~2015-08-02 10:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-02 9:48 [PATCH] devel/release-checks.sh: made python version check work with python 3 Tomi Ollila
2015-08-02 10:26 ` Tomi Ollila [this message]
2015-08-05 5:46 ` [PATCH] devel/release-checks: added checking of copyright year in documentation David Bremner
2015-08-04 14:32 ` [PATCH] devel/release-checks.sh: made python version check work with python 3 David Bremner
2015-08-04 17:20 ` Tomi Ollila
2015-08-05 5:23 ` David Bremner
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=1438511187-11321-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).