mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Added packager.
This commit is contained in:
parent
1bfdda7e71
commit
e6f4dfbfe2
@ -26,28 +26,15 @@ chdir($path);
|
|||||||
|
|
||||||
require 'helpers.pm';
|
require 'helpers.pm';
|
||||||
|
|
||||||
#Switch to the output folder.
|
|
||||||
chdir(Build::PathFormat('../../OUTPUT'));
|
|
||||||
|
|
||||||
my ($version);
|
my ($version);
|
||||||
|
$version = Build::ProductVersion(Build::PathFormat('../../product.version'));
|
||||||
|
$version .= '-hg' . Build::HgRevNum('.');
|
||||||
|
|
||||||
$version = Build::ProductVersion(Build::PathFormat('../product.version'));
|
#Switch to the output folder.
|
||||||
$version .= '-hg' . Build::HgRevNum('..');
|
chdir(Build::PathFormat('../../../OUTPUT'));
|
||||||
|
|
||||||
my ($filename);
|
my (@packages);
|
||||||
$filename = 'mmsource-' . $version;
|
@packages = ('base', 'cstrike', 'dod', 'esf', 'ns', 'tfc', 'ts');
|
||||||
if ($^O eq "linux")
|
|
||||||
{
|
|
||||||
$filename .= '.tar.gz';
|
|
||||||
print "tar zcvf $filename addons\n";
|
|
||||||
system("tar zcvf $filename addons");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$filename .= '.zip';
|
|
||||||
print "zip -r $filename addons\n";
|
|
||||||
system("zip -r $filename addons");
|
|
||||||
}
|
|
||||||
|
|
||||||
my ($major,$minor) = ($version =~ /^(\d+)\.(\d+)/);
|
my ($major,$minor) = ($version =~ /^(\d+)\.(\d+)/);
|
||||||
$ftp_path .= "/$major.$minor";
|
$ftp_path .= "/$major.$minor";
|
||||||
@ -67,12 +54,22 @@ if ($ftp_path ne '')
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ftp->binary();
|
$ftp->binary();
|
||||||
$ftp->put($filename)
|
my ($i);
|
||||||
or die "Cannot drop file $filename ($ftp_path): " . $ftp->message . "\n";
|
for ($i = 0; $i <= $#packages; $i++) {
|
||||||
|
my ($filename);
|
||||||
|
if ($^O eq "linux") {
|
||||||
|
$filename = "amxmodx-$version-" . $packages[$i] . ".tar.gz";
|
||||||
|
} else {
|
||||||
|
$filename = "amxmodx-$version-" . $packages[$i] . ".zip";
|
||||||
|
}
|
||||||
|
print "Uploading $filename...\n";
|
||||||
|
$ftp->put($filename)
|
||||||
|
or die "Cannot drop file $filename ($ftp_path): " . $ftp->message . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
$ftp->close();
|
$ftp->close();
|
||||||
|
|
||||||
print "File sent to drop site as $filename -- build succeeded.\n";
|
print "Files sent to drop site -- build succeeded.\n";
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user