forked from lovelywcm/autoproxy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake_release.pl
43 lines (32 loc) · 1.21 KB
/
make_release.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/perl
#############################################################################
# This is the release automation script, it will change current extension #
# version, create release builds and commit it all into Mercurial. Usually #
# you just want to create a build - use make_devbuild.pl for this. #
#############################################################################
use strict;
die "Version number not specified" unless @ARGV;
my $version = $ARGV[0];
$version =~ s/[^\w\.]//gs;
open(VERSION, ">version");
print VERSION $ARGV[0];
close(VERSION);
@ARGV = ("../downloads/autoproxy-$version.xpi");
do './create_xpi.pl';
opendir(LOCALES, "chrome/locale");
my @locales = grep {!/[^\w\-]/ && !-e("chrome/locale/$_/.incomplete")} readdir(LOCALES);
closedir(LOCALES);
# Create new single-locale builds
for my $locale (@locales)
{
@ARGV = ("../downloads/autoproxy-$version-$locale.xpi", $locale);
do './create_xpi.pl';
}
chdir('..');
system("hg add downloads/autoproxy-$version.xpi");
system(qq(hg commit -m "Releasing AutoProxy $version" downloads src));
my $branch = $version;
$branch =~ s/\./_/g;
$branch = "AutoProxy_".$branch."_RELEASE";
system(qq(hg tag $branch));
system(qq(hg push));