Module: tools Branch: master Commit: 32ed233321a3fda5261c83b4554caa43285166f8 URL: http://source.winehq.org/git/tools.git/?a=commit;h=32ed233321a3fda5261c83b45...
Author: André Hentschel nerv@dawncrow.de Date: Thu Jul 18 21:54:47 2013 +0200
update-winehq: Correctly parse stable release announcements.
---
update-winehq | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/update-winehq b/update-winehq index 046a8b8..79e08c7 100755 --- a/update-winehq +++ b/update-winehq @@ -34,6 +34,7 @@ system("git", "pull") == 0 or die "git pull failed";
open ANNOUNCE, $ARGV[1] || "ANNOUNCE" or die "cannot open ANNOUNCE"; my $whats_new = 0; +my $release_notes = 0; my $first = 1;
push @text, "<body>\n<p>"; @@ -41,7 +42,7 @@ push @text, "<body>\n<p>"; while (<ANNOUNCE>) { chomp; - if (!$whats_new) + if (!$whats_new && !$release_notes) { if (/^What's new in this release/) { @@ -49,6 +50,14 @@ while (<ANNOUNCE>) push @text, " <a href="{$root}/announce/$rel">What's new</a> in this release:"; next; } + elsif (/See the release notes/) + { + $release_notes = 1; + xml_escape($_); + s/See the release notes/See the <a href="{$root}/announce/$rel">release notes</a>/; + push @text, " " . $_; + next; + } if (/^\s*$/) { push @text, "</p>\n<p>"; @@ -68,8 +77,13 @@ while (<ANNOUNCE>) } if (/^\s*$/) { - push @text, "</li>\n</ul></p>\n<p>"; + if ($release_notes) { + push @text, "</p>\n"; + } else { + push @text, "</li>\n</ul>\n"; + } $whats_new = 0; + $release_notes = 0; next; } push @text, " " . xml_escape($_);