X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=devel%2Frelease-checks.sh;h=7ba948224bc732d807b80f7c3886ceb925af2426;hp=8604a9f7d10bb3e62a620de25ae02d7031bf8c42;hb=c20a5eb80520a11cb697a45b0d9553c68e2199c8;hpb=765556c1f159ae0a29137c935c7cbf4106569e7e diff --git a/devel/release-checks.sh b/devel/release-checks.sh index 8604a9f7..7ba94822 100755 --- a/devel/release-checks.sh +++ b/devel/release-checks.sh @@ -51,7 +51,7 @@ then exit 1 fi else - echo "Reading './version' file failed (suprisingly!)" + echo "Reading './version' file failed (surprisingly!)" exit 1 fi < ./version @@ -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