1 Return-Path: <mpn@google.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id B482C431FB6
\r
6 for <notmuch@notmuchmail.org>; Mon, 3 Sep 2012 05:03:51 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7]
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id 1FdwKoRGXXzd for <notmuch@notmuchmail.org>;
\r
17 Mon, 3 Sep 2012 05:03:50 -0700 (PDT)
\r
18 Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com
\r
19 [74.125.83.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
20 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
21 63841431FAF for <notmuch@notmuchmail.org>; Mon, 3 Sep 2012 05:03:50 -0700
\r
23 Received: by eekb47 with SMTP id b47so2241177eek.26
\r
24 for <notmuch@notmuchmail.org>; Mon, 03 Sep 2012 05:03:49 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
\r
26 s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references
\r
27 :user-agent:x-face:face:x-pgp:x-pgp-fp:date:message-id:mime-version
\r
28 :content-type; bh=mgvhuXIPc+i17l42CQQaDhwU50WckjlXG4UmaXULU8E=;
\r
29 b=WpH322MsNcdujFytTh1VztN7IYzZAZyDESRUEPIWAIEIbFtZE3phcKO01rEvS1Rwto
\r
30 Rcauk8dYVXQNC5I67AxO+3c5zze2aeSlf13cOeKXk5WXwDmI3lkjBwe9MASZvTqEA4Rv
\r
31 KxEcLuuqIADp9eJZxuOWu2yI4F3PDeQ/ov++f+MXeaN+dELaxBb7yszkLnhaHc1aNXfW
\r
32 OA0ilxIjTIUPvpF7f9+gnU5oNV1TDKMvZ9GKpQhKt3KDQN9gvq/dQAdULa4TXI//1+NE
\r
33 g0h0kzzXgyi6QIt/I+6BxREo1OocNa7ruObqZOydjPSQU7SaXmBx9l++kx2253DM44HP UIKg==
\r
34 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
35 d=google.com; s=20120113;
\r
36 h=sender:from:to:cc:subject:in-reply-to:organization:references
\r
37 :user-agent:x-face:face:x-pgp:x-pgp-fp:date:message-id:mime-version
\r
38 :content-type:x-gm-message-state;
\r
39 bh=mgvhuXIPc+i17l42CQQaDhwU50WckjlXG4UmaXULU8E=;
\r
40 b=bVaSf+hjiQ60Mv1dLOXqCxkOXJjb0O2NCBc/fT9mnm8yQl08VzK83aVNMVV9+w1XBo
\r
41 egeXbxozclkw9jnlaecbs4Ixmp/zSYm2sozo7hdT0fIQmyYvteTBVIr/tIyHbJmFoz/V
\r
42 SGGeHCPMJt+9zNFaJDavEgKLvKeHjr54HDrJO6Cy0mezdY8GP9h3JcMpfwQzUb+ShqsN
\r
43 6vwGdmyuaowNae4kNeak1nx4o7QEjxYq3Sgjp9m8gsHgXaudHTBhfCAOeoK3F/7Ll6Mc
\r
44 613cZsgWIFKVTlOeAOkxNdqejJcPsdNRn2w5DF6xaOvYCQ/UPzrnsPW7hnUAmgGNSvFO
\r
46 Received: by 10.14.204.200 with SMTP id h48mr21403773eeo.7.1346673829205;
\r
47 Mon, 03 Sep 2012 05:03:49 -0700 (PDT)
\r
48 Received: by 10.14.204.200 with SMTP id h48mr21403758eeo.7.1346673829045;
\r
49 Mon, 03 Sep 2012 05:03:49 -0700 (PDT)
\r
50 Received: from mpn-glaptop ([2620:0:105f:5:f2de:f1ff:fe35:1a72])
\r
51 by mx.google.com with ESMTPS id i8sm35886935eeo.16.2012.09.03.05.03.47
\r
52 (version=TLSv1/SSLv3 cipher=OTHER);
\r
53 Mon, 03 Sep 2012 05:03:47 -0700 (PDT)
\r
54 Sender: Michal Nazarewicz <mpn@google.com>
\r
55 From: Michal Nazarewicz <mina86@mina86.com>
\r
56 To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org
\r
57 Subject: Re: [PATCH V2 1/2] devel: add release-checks.sh
\r
58 In-Reply-To: <1346491928-2356-1-git-send-email-tomi.ollila@iki.fi>
\r
59 Organization: http://mina86.com/
\r
60 References: <1346491928-2356-1-git-send-email-tomi.ollila@iki.fi>
\r
61 User-Agent: Notmuch/0.14+2~g416b120 (http://notmuchmail.org) Emacs/24.2.50.1
\r
62 (x86_64-unknown-linux-gnu)
\r
63 X-Face: PbkBB1w#)bOqd`iCe"Ds{e+!C7`pkC9a|f)Qo^BMQvy\q5x3?vDQJeN(DS?|-^$uMti[3D*#^_Ts"pU$jBQLq~Ud6iNwAw_r_o_4]|JO?]}P_}Nc&"p#D(ZgUb4uCNPe7~a[DbPG0T~!&c.y$Ur,=N4RT>]dNpd; KFrfMCylc}gc??'U2j,!8%xdD
\r
64 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACQElEQVQ4jW3TMWvbQBQHcBk1xE6WyALX1069oZBMlq+ouUwpEQQ6uRjttkWP4CmBgGM0BQLBdPFZYPsyFUo6uEtKDQ7oy/U96XR2Ux8ehH/89Z6enqxBcS7Lg81jmSuujrfCZcLI/TYYvbGj+jbgFpHJ/bqQAUISj8iLyu4LuFHJTosxsucO4jSDNE0Hq3hwK/ceQ5sx97b8LcUDsILfk+ovHkOIsMbBfg43VuQ5Ln9YAGCkUdKJoXR9EclFBhixy3EGVz1K6eEkhxCAkeMMnqoAhAKwhoUJkDrCqvbecaYINlFKSRS1i12VKH1XpUd4qxL876EkMcDvHj3s5RBajHHMlA5iK32e0C7VgG0RlzFPvoYHZLRmAC0BmNcBruhkE0KsMsbEc62ZwUJDxWUdMsMhVqovoT96i/DnX/ASvz/6hbCabELLk/6FF/8PNpPCGqcZTGFcBhhAaZZDbQPaAB3+KrWWy2XgbYDNIinkdWAFcCpraDE/knwe5DBqGmgzESl1p2E4MWAz0VUPgYYzmfWb9yS4vCvgsxJriNTHoIBz5YteBvg+VGISQWUqhMiByPIPpygeDBE6elD973xWwKkEiHZAHKjhuPsFnBuArrzxtakRcISv+XMIPl4aGBUJm8Emk7qBYU8IlgNEIpiJhk/No24jHwkKTFHDWfPniR4iw5vJaw2nzSjfq2zffcE/GDjRC2dn0J0XwPAbDL84TvaFCJEU4Oml9pRyEUhR3Cl2t01AoEjRbs0sYugp14/4X5n4pU4EHHnMAAAAAElFTkSuQmCC
\r
66 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4
\r
67 Date: Mon, 03 Sep 2012 14:03:41 +0200
\r
68 Message-ID: <xa1t7gsbwbxe.fsf@mina86.com>
\r
70 Content-Type: multipart/mixed; boundary="=-=-="
\r
71 X-Gm-Message-State: ALoCoQlMVStqqKWVmrNVCe2V8KoM9OGZWoA3aWFuYjyMv1nsnhAYvvS2gGve6d8200Wu//j+bYTkPAmuIlW+cQW8jLyEBjLJFKEs+gVSiZu10bzVeoll4ffspt42d60ADLC2MtBX/8bH5rK05ZvTIjeGcLLKF47xzJRV9CVXE7EHbqT3UF9sO9vRPUDmnTF4e079FLH9+/Cx
\r
72 Cc: Tomi Ollila <tomi.ollila@iki.fi>
\r
73 X-BeenThere: notmuch@notmuchmail.org
\r
74 X-Mailman-Version: 2.1.13
\r
76 List-Id: "Use and development of the notmuch mail system."
\r
77 <notmuch.notmuchmail.org>
\r
78 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
79 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
80 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
81 List-Post: <mailto:notmuch@notmuchmail.org>
\r
82 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
83 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
84 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
85 X-List-Received-Date: Mon, 03 Sep 2012 12:03:51 -0000
\r
88 Content-Type: text/plain; charset=utf-8
\r
89 Content-Transfer-Encoding: quoted-printable
\r
91 Tomi Ollila <tomi.ollila@iki.fi> writes:
\r
92 > diff --git a/devel/release-checks.sh b/devel/release-checks.sh
\r
93 > new file mode 100755
\r
94 > index 0000000..7dadefa
\r
96 > +++ b/devel/release-checks.sh
\r
98 > +#!/usr/bin/env bash
\r
100 On a side note, the whole script could be relatively easily rewritten
\r
101 not to use bash at all and work with plain POSIX shell.
\r
105 > +#set -x # or enter bash -x ... on command line
\r
107 > +if [ x"${BASH_VERSION-}" =3D x ]
\r
112 > + echo "Please execute this script using 'bash' interpreter"
\r
117 > +set -o pipefail # bash feature
\r
119 > +# Avoid locale-specific differences in output of executed commands
\r
120 > +LANG=3DC LC_ALL=3DC; export LANG LC_ALL
\r
122 > +readonly DEFAULT_IFS=3D"$IFS"
\r
127 > +readonly PV_FILE=3D'bindings/python/notmuch/version.py'
\r
129 > +# Using array here turned out to be unnecessarily complicated
\r
133 > + emsgs=3D"${emsgs:+$emsgs\n} $1"
\r
136 > +for f in ./version debian/changelog NEWS "$PV_FILE"
\r
138 > + test -f $f || { append_emsg "File '$f' is missing"; continue; }
\r
139 > + test -r $f || { append_emsg "File '$f' is unreadable"; continue; }
\r
140 > + test -s $f || append_emsg "File '$f' is empty"
\r
142 if ! [ -f "$f" ]; then
\r
143 append_emsg "File '$f' is missing"
\r
144 elif ! [ -r "$f" ]; then
\r
145 append_emsg "File '$f' is unreadable"
\r
146 elif ! [ -s "$f" ]; then
\r
147 append_emsg "File '$f' is empty"
\r
152 > +if [ -n "$emsgs" ]
\r
154 > + echo 'Release files problems; fix these and try again:'
\r
155 > + echo -e "$emsgs"
\r
162 > + then echo "'version' file contains more than one line"
\r
166 > + echo "Reading './version' file failed (suprisingly!)"
\r
170 > +readonly VERSION
\r
176 > + echo "Please follow the instructions in RELEASING to choose a version"
\r
180 > +echo -n "Checking that '$VERSION' is good with digits and periods... "
\r
181 > +if [ -z "${VERSION//[0123456789.]/}" ] # bash feature
\r
183 > + case $VERSION in
\r
184 > + .*) verfail "'$VERSION' begins with a period" ;;
\r
185 > + *.) verfail "'$VERSION' ends with a period" ;;
\r
186 > + *..*) verfail "'$VERSION' contains two consecutive periods" ;;
\r
187 > + *.*) echo Yes. ;;
\r
188 > + *) verfail "'$VERSION' is a single number" ;;
\r
191 > + verfail "'$VERSION' contains other characters than digits and periods"
\r
194 The outer condition can be put inside of case as so:
\r
196 *[^0-9.]*) verfail "'$VERSION' contains other characters than digits and p=
\r
199 This makes it more readable by putting all checks in case rather than
\r
200 splitting one to an outer if.
\r
204 > +# In the rest of this file, tests collect list of errors to be fixed
\r
206 > +echo -n "Checking that this is Debian package for notmuch... "
\r
207 > +read deb_notmuch deb_version rest < debian/changelog
\r
208 > +if [ "$deb_notmuch" =3D 'notmuch' ]
\r
210 if [ x"$deb_notmuch" =3D xnotmuch ]
\r
212 And so in the rest of the conditions below.
\r
218 > + append_emsg "Package name '$deb_notmuch' is not 'notmuch' in debian/cha=
\r
222 > +echo -n "Checking that Debian package version is $VERSION-1... "
\r
224 > +if [ "$deb_version" =3D "($VERSION-1)" ]
\r
229 > + append_emsg "Version '$deb_version' is not '($VERSION-1)' in debian/cha=
\r
233 > +echo -n "Checking that python bindings version is $VERSION... "
\r
234 > +py_version=3D`python -c "execfile('$PV_FILE'); print __VERSION__"`
\r
235 > +if [ "$py_version" =3D "$VERSION" ]
\r
240 > + append_emsg "Version '$py_version' is not '$VERSION' in $PV_FILE"
\r
243 > +echo -n "Checking that this is Notmuch NEWS... "
\r
244 > +read news_notmuch news_version news_date < NEWS
\r
245 > +if [ "$news_notmuch" =3D "Notmuch" ]
\r
250 > + append_emsg "First word '$news_notmuch' is not 'Notmuch' in NEWS file"
\r
253 > +echo -n "Checking that NEWS version is $VERSION... "
\r
254 > +if [ "$news_version" =3D "$VERSION" ]
\r
259 > + append_emsg "Version '$news_version' in NEWS file is not '$VERSION'"
\r
262 > +#eval `date '+year=3D%Y mon=3D%m day=3D%d'`
\r
263 > +today0utc=3D`date --date=3D0Z +%s` # gnu date feature
\r
265 > +echo -n "Checking that NEWS date is right... "
\r
266 > +case $news_date in
\r
267 > + '('[2-9][0-9][0-9][0-9]-[01][0-9]-[0123][0-9]')')
\r
268 > + newsdate0utc=3D`nd=3D${news_date#\\(}; date --date=3D"${nd%)} 0Z" +%s`
\r
269 > + ddiff=3D$((newsdate0utc - today0utc))
\r
270 > + if [ $ddiff -lt -86400 ] # since beginning of yesterday...
\r
273 > + append_emsg "Date $news_date in NEWS file is too much in the past"
\r
274 > + elif [ $ddiff -gt 172800 ] # up to end of tomorrow...
\r
277 > + append_emsg "Date $news_date in NEWS file is too much in the future"
\r
283 > + append_emsg "Date '$news_date' in NEWS file is not in format (yyyy-mm-d=
\r
287 > +readonly DATE=3D${news_date//[()]/} # bash feature
\r
292 Uh? Did you mean =E2=80=9Cset -- $*=E2=80=9D?
\r
294 > + if [ $# !=3D 7 ]
\r
296 > + append_emsg "'$mp' has too many '.TH' lines"
\r
297 > + man_mismatch=3D1
\r
299 > + man_date=3D${5-} man_version=3D${7-}
\r
302 > +echo -n "Checking that manual page dates and versions are $DATE and $VER=
\r
304 > +manfiles=3D`find man -type f | sort`
\r
305 > +man_pages_ok=3DYes
\r
306 > +for mp in $manfiles
\r
308 > + case $mp in *.[0-9]) ;; # fall below this 'case ... esac'
\r
310 Perhaps new line after =E2=80=9Cin=E2=80=9D?
\r
312 > + */Makefile.local | */Makefile ) continue ;;
\r
313 > + */.gitignore) continue ;;
\r
314 > + *.bak) continue ;;
\r
316 > + *) append_emsg "'$mp': extra file"
\r
317 > + man_pages_ok=3DNo
\r
320 > + manthdata `sed -n '/^[.]TH NOTMUCH/ { y/"/ /; p; }' "$mp"`
\r
322 Alternatively =E2=80=9C\.=E2=80=9D instead of =E2=80=9C[.]=E2=80=9D.
\r
324 > + if [ "$man_version" !=3D "$VERSION" ]
\r
325 > + then append_emsg "Version '$man_version' is not '$VERSION' in $mp"
\r
326 > + mman_pages_ok=3DNo
\r
328 > + if [ "$man_date" !=3D "$DATE" ]
\r
329 > + then append_emsg "DATE '$man_date' is not '$DATE' in $mp"
\r
330 > + man_pages_ok=3DNo
\r
333 > +echo $man_pages_ok.
\r
335 > +if [ -n "$emsgs" ]
\r
338 > + echo 'Release check failed; check these issues:'
\r
339 > + echo -e "$emsgs"
\r
343 > +echo 'All checks this script executed completed successfully.'
\r
344 > +echo 'Make sure that everything else mentioned in RELEASING'
\r
345 > +echo 'file is in order, too.'
\r
352 > +# Local variables:
\r
353 > +# mode: shell-script
\r
354 > +# sh-basic-offset: 8
\r
357 > +# vi: set sw=3D8 ts=3D8
\r
361 .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o
\r
362 ..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz =
\r
364 ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--
\r
366 Content-Type: multipart/signed; boundary="==-=-=";
\r
367 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
370 Content-Type: text/plain
\r
374 Content-Type: application/pgp-signature
\r
376 -----BEGIN PGP SIGNATURE-----
\r
377 Version: GnuPG v1.4.10 (GNU/Linux)
\r
379 iQIcBAEBAgAGBQJQRJydAAoJECBgQBJQdR/0nucP/R6zc1d5OupCMuJSpCoO7Ivh
\r
380 4dK7QsW5D52tm9gBP7ZCVZUVI1r8hUKpolH8sQ4HW+D3bedmMdb49ys5BwoKLALh
\r
381 jh7T7Okuz4kOkoRTgN/9XOo+uYUO7b0NkmXTlhUS0B2qPAPmcMR7W9qPx7raBP50
\r
382 cZTQi2pDiYNHXdWUH7DV8DbqaphZkElQU2DJdVcjGginCey9z4weJN3wY9MWDhtk
\r
383 RYHr3xzkxHIdpMdpzj6+m4UGU4e70TmeqZMDOQn+5fC8TqwZpKSGqaEX3i3Mq9e1
\r
384 LcypWwQyTqTK4wOzR4I5qYcLTW6joNVpTH7eqTeZ9kyNrBuZYTszQgRBAt8No325
\r
385 s189aUlGsBKy0tyxAL/UEpvCO8lTnk0+7iJHavdRaKzMGFT6y5i6WQDuruUDGmeh
\r
386 TL/zNYrdmNTQDCjvi2FbaPsX6BhPKANnHElb0iyCU4GSfNwJ/LQm0e6Z4OfOSUg8
\r
387 hW6kL1QsSoqIsKThjkBqeA++2uf+GBKjAh1uzvJlWxmn+kz8pD/1WoHnH1w/RccJ
\r
388 z3QJ2Wuky5NxmSAL4+op6rXry9IcorGvELRs/LUhaMHT3FwpyH6G0JlT82L+FsqB
\r
389 P7/h+Vmc59OWfCXCzlepeLjqDQLQwRGzmo9XCBWEm0q6K3QbVVuxN/LyPgZ1Elzz
\r
390 6UtZ6WBOKNqeDcRMtXhF
\r
392 -----END PGP SIGNATURE-----
\r