* [PATCH] devel/release-checks.sh: made python version check work with python 3
@ 2015-08-02 9:48 Tomi Ollila
2015-08-02 10:26 ` [PATCH] devel/release-checks: added checking of copyright year in documentation Tomi Ollila
2015-08-04 14:32 ` [PATCH] devel/release-checks.sh: made python version check work with python 3 David Bremner
0 siblings, 2 replies; 6+ messages in thread
From: Tomi Ollila @ 2015-08-02 9:48 UTC (permalink / raw)
To: notmuch; +Cc: tomi.ollila
This trivial change consists of just putting print() argument in
parentheses.
---
devel/release-checks.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/devel/release-checks.sh b/devel/release-checks.sh
index efd0b3441f2e..bf0d68a444b6 100755
--- a/devel/release-checks.sh
+++ b/devel/release-checks.sh
@@ -141,7 +141,7 @@ else
fi
echo -n "Checking that python bindings version is $VERSION... "
-py_version=`python -c "with open('$PV_FILE') as vf: exec(vf.read()); print __VERSION__"`
+py_version=`python -c "with open('$PV_FILE') as vf: exec(vf.read()); print(__VERSION__)"`
if [ "$py_version" = "$VERSION" ]
then
echo Yes.
--
2.0.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] devel/release-checks: added checking of copyright year in documentation
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
2015-08-05 5:46 ` David Bremner
2015-08-04 14:32 ` [PATCH] devel/release-checks.sh: made python version check work with python 3 David Bremner
1 sibling, 1 reply; 6+ messages in thread
From: Tomi Ollila @ 2015-08-02 10:26 UTC (permalink / raw)
To: notmuch; +Cc: tomi.ollila
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] devel/release-checks.sh: made python version check work with python 3
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 ` [PATCH] devel/release-checks: added checking of copyright year in documentation Tomi Ollila
@ 2015-08-04 14:32 ` David Bremner
2015-08-04 17:20 ` Tomi Ollila
1 sibling, 1 reply; 6+ messages in thread
From: David Bremner @ 2015-08-04 14:32 UTC (permalink / raw)
To: Tomi Ollila, notmuch; +Cc: tomi.ollila
Tomi Ollila <tomi.ollila@iki.fi> writes:
> This trivial change consists of just putting print() argument in
> parentheses.
Pushed. BTW, would it be a good thing or a bad one to take the python
binary name here from sh.config? Or just not worth the trouble?
d
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] devel/release-checks.sh: made python version check work with python 3
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
0 siblings, 1 reply; 6+ messages in thread
From: Tomi Ollila @ 2015-08-04 17:20 UTC (permalink / raw)
To: David Bremner, notmuch
On Tue, Aug 04 2015, David Bremner <david@tethera.net> wrote:
> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>> This trivial change consists of just putting print() argument in
>> parentheses.
>
> Pushed.
Thanks.
> BTW, would it be a good thing or a bad one to take the python
> binary name here from sh.config? Or just not worth the trouble?
I'd say that unless there ever is problem with binary name `python` to make
those checks to succeed then we could think whether to depend on sh.config
existing... or do the same way resolving python as configure does.
> d
Tomi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] devel/release-checks.sh: made python version check work with python 3
2015-08-04 17:20 ` Tomi Ollila
@ 2015-08-05 5:23 ` David Bremner
0 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2015-08-05 5:23 UTC (permalink / raw)
To: Tomi Ollila, notmuch
Tomi Ollila <tomi.ollila@iki.fi> writes:
>
> I'd say that unless there ever is problem with binary name `python` to make
> those checks to succeed then we could think whether to depend on sh.config
> existing... or do the same way resolving python as configure does.
>
OK, for now, since there is a very small group of users for
release-checks.sh, let's wait for the hardcoded binary name to cause
problems for someone.
d
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] devel/release-checks: added checking of copyright year in documentation
2015-08-02 10:26 ` [PATCH] devel/release-checks: added checking of copyright year in documentation Tomi Ollila
@ 2015-08-05 5:46 ` David Bremner
0 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2015-08-05 5:46 UTC (permalink / raw)
To: Tomi Ollila, notmuch
Tomi Ollila <tomi.ollila@iki.fi> writes:
> +copyrightline=`exec python -c "__file__ = 'command-line'
> +with open('doc/conf.py') as cf: exec(cf.read()); print(copyright)"`
That took me several tries to understand what is going on. Perhaps
that's because patch-review time co-incides with first coffee of the
day, but could you explain it in a comment or something, just in case
it's not only me who finds it confusing.
d
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-05 5:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] devel/release-checks: added checking of copyright year in documentation Tomi Ollila
2015-08-05 5:46 ` 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
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).