[tools] update-winehq: Correctly parse stable release announcements
André Hentschel
nerv at dawncrow.de
Thu Jul 18 14:54:47 CDT 2013
---
update-winehq | 18 ++++++++++++++++--
1 file 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($_);
--
1.8.1.2
More information about the wine-patches
mailing list