unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/1] devel/release-checks.sh: added check that 1st NEWS header is tidy
@ 2013-01-30 15:01 Tomi Ollila
  2013-02-16 11:44 ` David Bremner
  2013-02-19  1:11 ` David Bremner
  0 siblings, 2 replies; 4+ messages in thread
From: Tomi Ollila @ 2013-01-30 15:01 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

Check that the underlining '===...' for first (header) line in NEWS
file is of the same length as the header text and it is all '=':s.
---
 devel/release-checks.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/devel/release-checks.sh b/devel/release-checks.sh
index d2bbc6a..c13758a 100755
--- a/devel/release-checks.sh
+++ b/devel/release-checks.sh
@@ -104,6 +104,20 @@ else
 	append_emsg "Version '$py_version' is not '$VERSION' in $PV_FILE"
 fi
 
+echo -n "Checking that NEWS header is tidy... "
+if [ "`exec sed 's/./=/g; 1q' NEWS`" = "`exec sed '1d; 2q' NEWS`" ]
+then
+	echo Yes.
+else
+	echo No.
+	if [ "`exec sed '1d; s/=//g; 2q' NEWS`" != '' ]
+	then
+		append_emsg "Line 2 in NEWS file is not all '=':s"
+	else
+		append_emsg "Line 2 in NEWS file does not have the same length as line 1"
+	fi
+fi
+
 echo -n "Checking that this is Notmuch NEWS... "
 read news_notmuch news_version news_date < NEWS
 if [ "$news_notmuch" = "Notmuch" ]
-- 
1.8.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] devel/release-checks.sh: added check that 1st NEWS header is tidy
  2013-01-30 15:01 [PATCH 1/1] devel/release-checks.sh: added check that 1st NEWS header is tidy Tomi Ollila
@ 2013-02-16 11:44 ` David Bremner
  2013-02-18 16:25   ` Tomi Ollila
  2013-02-19  1:11 ` David Bremner
  1 sibling, 1 reply; 4+ messages in thread
From: David Bremner @ 2013-02-16 11:44 UTC (permalink / raw)
  To: Tomi Ollila, notmuch; +Cc: tomi.ollila

Tomi Ollila <tomi.ollila@iki.fi> writes:

> +echo -n "Checking that NEWS header is tidy... "
> +if [ "`exec sed 's/./=/g; 1q' NEWS`" = "`exec sed '1d; 2q' NEWS`" ]

This patch seems OK to me, although the execs might be a bit overkill
for a script that is run once ever few months.

d

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] devel/release-checks.sh: added check that 1st NEWS header is tidy
  2013-02-16 11:44 ` David Bremner
@ 2013-02-18 16:25   ` Tomi Ollila
  0 siblings, 0 replies; 4+ messages in thread
From: Tomi Ollila @ 2013-02-18 16:25 UTC (permalink / raw)
  To: David Bremner, notmuch

On Sat, Feb 16 2013, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>> +echo -n "Checking that NEWS header is tidy... "
>> +if [ "`exec sed 's/./=/g; 1q' NEWS`" = "`exec sed '1d; 2q' NEWS`" ]
>
> This patch seems OK to me, although the execs might be a bit overkill
> for a script that is run once ever few months.

You're right. The 2 extra fork(2):s(*) here doesn't matter...

In case you don't amend my patch in following weeks I'll send
a new patch :)

> d

(*) FYI: It is only bash(1) which forks process to execute the external
command in such a trivial cases. Most (if not all) other shells have
(conservative) heuristics to avoid the "extra" fork there. If you're
interested, my simple way to test this is 'strace -ff -o pidc cmd args...'

Tomi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] devel/release-checks.sh: added check that 1st NEWS header is tidy
  2013-01-30 15:01 [PATCH 1/1] devel/release-checks.sh: added check that 1st NEWS header is tidy Tomi Ollila
  2013-02-16 11:44 ` David Bremner
@ 2013-02-19  1:11 ` David Bremner
  1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2013-02-19  1:11 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:

> Check that the underlining '===...' for first (header) line in NEWS
> file is of the same length as the header text and it is all '=':s.

pushed, sans execs

d

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-19  1:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30 15:01 [PATCH 1/1] devel/release-checks.sh: added check that 1st NEWS header is tidy Tomi Ollila
2013-02-16 11:44 ` David Bremner
2013-02-18 16:25   ` Tomi Ollila
2013-02-19  1:11 ` 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).