devel: news2wiki to recognize yyyy-mm-dd or UNRELEASED as release date

The yyyy-mm-dd (actually \d\d\d\d-\d\d-\d\d) for a bit more restrictive
(and self-documentative) than the \w\w\w\w-... that used to be there and
UNRELEASED so that developers can test the latest NEWS converted to mdwn
format before submitting NEWS patches.
This commit is contained in:
Tomi Ollila 2014-05-07 22:33:38 +03:00 committed by David Bremner
parent 2e1eee3a77
commit 24b24be151

View file

@ -32,8 +32,7 @@ while (<I>)
{ {
warn "$ARGV[0]:$.: tab(s) in line!\n" if /\t/; warn "$ARGV[0]:$.: tab(s) in line!\n" if /\t/;
warn "$ARGV[0]:$.: trailing whitespace\n" if /\s\s$/; warn "$ARGV[0]:$.: trailing whitespace\n" if /\s\s$/;
# The date part in regex recognizes wip version dates like: (201x-xx-xx). if (/^Notmuch\s+(\S+)\s+\((\d\d\d\d-\d\d-\d\d|UNRELEASED)\)\s*$/) {
if (/^Notmuch\s+(\S+)\s+\((\w\w\w\w-\w\w-\w\w)\)\s*$/) {
# open O... autocloses previously opened file. # open O... autocloses previously opened file.
open O, '>', "$ARGV[1]/release-$1.mdwn" or die $!; open O, '>', "$ARGV[1]/release-$1.mdwn" or die $!;
print "+ release-$1.mdwn...\n"; print "+ release-$1.mdwn...\n";