PageRenderTime 20ms CodeModel.GetById 13ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/tools/smokeNsend.pl

http://github.com/PerlGameDev/SDL
Perl | 31 lines | 24 code | 5 blank | 2 comment | 8 complexity | 59ddbc67a4ddfb0cb11b75149922a0aa MD5 | raw file
 1#!perl
 2#
 3die
 4	"Usage: username password [git-branch] [toggle for main repo] [extra options for smolder_smoke_signal]. \n Found @ARGV args"
 5	if $#ARGV < 1;
 6my $revision = `git log  --pretty='%h' -n 1`;
 7
 8if ( !$revision ) #Don't have pretty format supported in git so using regex
 9{
10	$revision = `git log -n 1`;
11
12	$revision =~ /commit (\w{8})/;
13
14	$revision = $1;
15}
16
17if ( !$ARGV[4] ) {
18	system split ' ', "git pull origin $ARGV[2]"
19		if ( $ARGV[2] && !( $ARGV[3] ) );
20	system split ' ', "git pull git://github.com/kthakore/SDL_perl.git $ARGV[2]"
21		if $ARGV[3];
22	system( 'perl', 'Build.PL' );
23	system( 'perl', 'Build' );
24	unlink('sdl.tar.gz');
25	system split ' ', 'prove -vlbm --archive sdl.tar.gz';
26}
27
28my $cmd =
29	"perl tools/smolder_smoke_signal --server sdlperl.ath.cx --port 8080  --username $ARGV[0] --password $ARGV[1] --file sdl.tar.gz --project SDL --architecture $] --platform $^O $ARGV[3] --revision $revision";
30warn $cmd;
31system split ' ', $cmd;