make_announce: Update version number parsing for the new versioning scheme.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
242cbb1673
commit
9629bb6ad2
|
@ -109,7 +109,7 @@ my $old = get_current_version();
|
||||||
my $new = $ARGV[0];
|
my $new = $ARGV[0];
|
||||||
unless ($new)
|
unless ($new)
|
||||||
{
|
{
|
||||||
if ($old =~ /^([0-9]+)\.([0-9]+)$/) { $new = "$1.$2.1"; }
|
if ($old =~ /^([0-9]+)\.([0-9]+)$/) { $new = "$1." . ($2 + 1); }
|
||||||
elsif ($old =~ /^([0-9]+)\.([0-9]+)\.([0-9]+)$/) { $new = "$1.$2." . ($3 + 1); }
|
elsif ($old =~ /^([0-9]+)\.([0-9]+)\.([0-9]+)$/) { $new = "$1.$2." . ($3 + 1); }
|
||||||
elsif ($old =~ /^([0-9]+)\.([0-9]+)-rc([0-9]+)$/) { $new = "$1.$2-rc" . ($3 + 1); }
|
elsif ($old =~ /^([0-9]+)\.([0-9]+)-rc([0-9]+)$/) { $new = "$1.$2-rc" . ($3 + 1); }
|
||||||
else { die "unknown version format $old"; }
|
else { die "unknown version format $old"; }
|
||||||
|
@ -117,8 +117,12 @@ unless ($new)
|
||||||
|
|
||||||
print "Updating files for release $new\n";
|
print "Updating files for release $new\n";
|
||||||
|
|
||||||
(my $reldir = $new) =~ s/^([0-9]+\.[0-9]+).*/$1/;
|
my $reldir = $new;
|
||||||
my $is_stable = ($new =~ /^([0-9]+)\.([0-9]+)\.([0-9]+)$/) && !($2 % 2); # stable releases have an even minor number
|
if ($reldir =~ /^([0-9]+\.0)/) { $reldir = $1; }
|
||||||
|
elsif ($reldir =~ /^([0-9]+)\./) { $reldir = "$1.x"; }
|
||||||
|
else { die "unknown version format $reldir"; }
|
||||||
|
|
||||||
|
my $is_stable = ($new =~ /^([0-9]+)\.0\.([0-9]+)$/); # stable releases have a 0 minor number
|
||||||
my $filter = "product=Wine&resolution=FIXED&" . ($is_stable ? "target_milestone=$reldir.x" : "bug_status=RESOLVED");
|
my $filter = "product=Wine&resolution=FIXED&" . ($is_stable ? "target_milestone=$reldir.x" : "bug_status=RESOLVED");
|
||||||
|
|
||||||
my %bugs = get_bugs( $filter );
|
my %bugs = get_bugs( $filter );
|
||||||
|
@ -128,11 +132,16 @@ my %authors = get_authors();
|
||||||
|
|
||||||
open ANNOUNCE, "<ANNOUNCE" or die "cannot open ANNOUNCE";
|
open ANNOUNCE, "<ANNOUNCE" or die "cannot open ANNOUNCE";
|
||||||
open NEW, ">ANNOUNCE.new" or die "cannot create ANNOUNCE.new";
|
open NEW, ">ANNOUNCE.new" or die "cannot create ANNOUNCE.new";
|
||||||
|
|
||||||
|
# replace version number in first line
|
||||||
|
$_ = <ANNOUNCE>;
|
||||||
|
s/(([0-9]+)\.)+[0-9]+(-rc[0-9]+)?/$new/;
|
||||||
|
print NEW $_;
|
||||||
|
|
||||||
while (<ANNOUNCE>)
|
while (<ANNOUNCE>)
|
||||||
{
|
{
|
||||||
last if /^------------------/;
|
last if /^------------------/;
|
||||||
s!http://mirrors.ibiblio.org/wine/source/.*!http://mirrors.ibiblio.org/wine/source/$reldir/wine-$new.tar.bz2!;
|
s!(https?://.*/wine/source/).*\.tar!$1$reldir/wine-$new.tar!;
|
||||||
s!http://dl.winehq.org/wine/source/.*!http://dl.winehq.org/wine/source/$reldir/wine-$new.tar.bz2!;
|
|
||||||
print NEW $_;
|
print NEW $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue