3fa9fff96a09a1db658e6d7035636ed670e0c5d8
[gitmo/Mouse.git] / author / test-externals.pl
1 #!perl -w
2 use strict;
3 use FindBin qw($Bin);
4 use autodie;
5
6 my %dist = (
7     'HTTP-Engine'  => q{git://github.com/http-engine/HTTP-Engine.git},
8     'HTTP-Engine-Middleware'
9                    => q{git://github.com/http-engine/HTTP-Engine-Middleware.git},
10
11     'Ark'          => q{git://github.com/typester/ark-perl.git},
12     'Object-Container'
13                     => q{git://github.com/typester/object-container-perl.git},
14
15     'MouseX-Types'  => q{git://github.com/yappo/p5-mousex-types.git},
16
17     'Data-Localize' => q{git://github.com/lestrrat/Data-Localize.git},
18
19     'MouseX-AttributeHelpers'
20                     => q{git://github.com/masaki/mousex-attributehelpers.git},
21
22     'HTML-Shakan'   => q{git://github.com/tokuhirom/html-shakan.git},
23
24     'Net-Google-DataAPI'
25                     => q{git://github.com/lopnor/Net-Google-DataAPI.git},
26 );
27
28 my $distdir = 'externals';
29
30 chdir $Bin;
31 mkdir $distdir if not -e $distdir;
32
33 $ENV{ANY_MOOSE} = 'Mouse';
34
35 while(my($name, $repo) = each %dist){
36     chdir "$Bin/$distdir";
37
38     print "Go $name ($repo)\n";
39
40     if(!(-e "$name")){
41         system "git clone $repo $name";
42         chdir $name;
43     }
44     else{
45         chdir $name;
46         system "git pull";
47     }
48
49     print "$^X Makefile.PL\n";
50     system("$^X Makefile.PL 2>&1 |tee ../$name.log");
51
52     print "make\n";
53     system("make 2>&1 >>../$name.log");
54
55     print "make test\n";
56     system("make test 2>&1 |tee -a ../$name.log")
57 }