Update the rest of the buildbot scripts for AMBuild.
Former-commit-id: ef3e192105c8c7f3905a2ceb82df4751d51cc013
This commit is contained in:
parent
426771deda
commit
e56cd58d70
|
@ -10,7 +10,7 @@ chdir($path);
|
||||||
require 'helpers.pm';
|
require 'helpers.pm';
|
||||||
|
|
||||||
#Go to main source dir
|
#Go to main source dir
|
||||||
chdir(Build::PathFormat('../..'));
|
chdir(Build::PathFormat('../../..'));
|
||||||
|
|
||||||
#Get the source path.
|
#Get the source path.
|
||||||
our ($root) = getcwd();
|
our ($root) = getcwd();
|
||||||
|
|
|
@ -9,6 +9,24 @@ our $SVN = "/usr/bin/svn";
|
||||||
our $SVN_USER = 'dvander';
|
our $SVN_USER = 'dvander';
|
||||||
our $SVN_ARGS = '';
|
our $SVN_ARGS = '';
|
||||||
|
|
||||||
|
sub GitRevNum
|
||||||
|
{
|
||||||
|
my ($path) = (@_);
|
||||||
|
my ($cd, $text, $rev);
|
||||||
|
|
||||||
|
$cd = Cwd::cwd();
|
||||||
|
chdir($path);
|
||||||
|
$text = `git rev-list --count HEAD`;
|
||||||
|
chdir($cd);
|
||||||
|
|
||||||
|
chomp $text;
|
||||||
|
if ($text =~ /^(\d+)/) {
|
||||||
|
return $1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
sub HgRevNum
|
sub HgRevNum
|
||||||
{
|
{
|
||||||
my ($path) = (@_);
|
my ($path) = (@_);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
# vim: set ts=4 sts=4 sw=4 tw=99 noet:
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
|
@ -28,7 +29,7 @@ require 'helpers.pm';
|
||||||
|
|
||||||
my ($version);
|
my ($version);
|
||||||
$version = Build::ProductVersion(Build::PathFormat('../../product.version'));
|
$version = Build::ProductVersion(Build::PathFormat('../../product.version'));
|
||||||
$version .= '-hg' . Build::HgRevNum('.');
|
$version .= '-git' . Build::GitRevNum('.');
|
||||||
|
|
||||||
#Switch to the output folder.
|
#Switch to the output folder.
|
||||||
chdir(Build::PathFormat('../../../OUTPUT'));
|
chdir(Build::PathFormat('../../../OUTPUT'));
|
||||||
|
@ -38,9 +39,33 @@ my (@packages,@mac_exclude);
|
||||||
@mac_exclude = ('esf', 'ns', 'ts');
|
@mac_exclude = ('esf', 'ns', 'ts');
|
||||||
|
|
||||||
my ($major,$minor) = ($version =~ /^(\d+)\.(\d+)/);
|
my ($major,$minor) = ($version =~ /^(\d+)\.(\d+)/);
|
||||||
$ftp_path .= "/$major.$minor";
|
|
||||||
|
my ($i);
|
||||||
|
for ($i = 0; $i <= $#packages; $i++) {
|
||||||
|
my ($filename);
|
||||||
|
next if (($^O eq "darwin") && ($packages[$i] ~~ @mac_exclude));
|
||||||
|
|
||||||
|
if ($^O eq "linux") {
|
||||||
|
$filename = "amxmodx-$version-" . $packages[$i] . "-linux.tar.gz";
|
||||||
|
} elsif ($^O eq "darwin") {
|
||||||
|
$filename = "amxmodx-$version-" . $packages[$i] . "-mac.zip";
|
||||||
|
} else {
|
||||||
|
$filename = "amxmodx-$version-" . $packages[$i] . "-windows.zip";
|
||||||
|
}
|
||||||
|
unlink($filename);
|
||||||
|
|
||||||
|
chdir(Build::PathFormat("packages/" . $packages[$i]));
|
||||||
|
if ($^O eq "linux") {
|
||||||
|
Build::Command("tar zcvf $filename addons");
|
||||||
|
} else {
|
||||||
|
Build::Command("zip -r $filename addons");
|
||||||
|
}
|
||||||
|
Build::Move($filename, Build::PathFormat('../../'));
|
||||||
|
chdir(Build::PathFormat('../..'));
|
||||||
|
}
|
||||||
|
|
||||||
my ($ftp);
|
my ($ftp);
|
||||||
|
$ftp_path .= "/$major.$minor";
|
||||||
|
|
||||||
$ftp = Net::FTP->new($ftp_host, Debug => 0, Passive => 0)
|
$ftp = Net::FTP->new($ftp_host, Debug => 0, Passive => 0)
|
||||||
or die "Cannot connect to host $ftp_host: $@";
|
or die "Cannot connect to host $ftp_host: $@";
|
||||||
|
@ -55,7 +80,6 @@ if ($ftp_path ne '')
|
||||||
}
|
}
|
||||||
|
|
||||||
$ftp->binary();
|
$ftp->binary();
|
||||||
my ($i);
|
|
||||||
for ($i = 0; $i <= $#packages; $i++) {
|
for ($i = 0; $i <= $#packages; $i++) {
|
||||||
my ($filename);
|
my ($filename);
|
||||||
if ($^O eq "linux") {
|
if ($^O eq "linux") {
|
||||||
|
|
|
@ -7,7 +7,7 @@ chdir($path);
|
||||||
|
|
||||||
require 'helpers.pm';
|
require 'helpers.pm';
|
||||||
|
|
||||||
chdir('../../OUTPUT');
|
chdir('../../../OUTPUT');
|
||||||
|
|
||||||
my $argn = $#ARGV + 1;
|
my $argn = $#ARGV + 1;
|
||||||
if ($argn > 0) {
|
if ($argn > 0) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user