fix changes2html to allow for -ALPHA or -BETA releases

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1348294 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-06-09 01:33:45 +00:00
parent e650829677
commit 4e78ece771
1 changed files with 2 additions and 1 deletions

View File

@ -64,7 +64,8 @@ for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) {
if (/\s*===+\s*(.*?)\s*===+\s*/) { # New-style release headings
$release = $1;
$release =~ s/^(?:release|lucene)\s*//i; # Trim "Release " or "Lucene " prefix
($release, $relinfo) = ($release =~ /^(\d+(?:\.(?:\d+|[xyz]))*|Trunk)\s*(.*)/i);
($release, $relinfo) = ($release =~ /^(\d+(?:\.(?:\d+(\-ALPHA|\-BETA)?|[xyz]))*|Trunk)\s*(.*)/i);
$relinfo =~ s/(\-ALPHA|\-BETA)//; # Trim -ALPHA or -BETA to only be in release (TODO: please fix the above regex instead!)
$relinfo =~ s/\s*:\s*$//; # Trim trailing colon
$relinfo =~ s/^\s*,\s*//; # Trim leading comma
($reldate, $relinfo) = get_release_date($release, $relinfo);