[PATCH] devel/release-checks: added checking of copyright year in documentation

Tomi Ollila tomi.ollila at iki.fi
Sun Aug 2 03:26:27 PDT 2015


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



More information about the notmuch mailing list