Changes to buildbot scripts for Mercurial.

This commit is contained in:
David Anderson 2008-09-14 16:40:49 -05:00
parent 8fcecf3dec
commit f79c9eec82
3 changed files with 23 additions and 4 deletions

View File

@ -9,7 +9,26 @@ our $SVN = "/usr/bin/svn";
our $SVN_USER = 'dvander';
our $SVN_ARGS = '';
sub Revision
sub HgRevNum
{
my ($path) = (@_);
my ($cd, $text, $rev);
$cd = Cwd::cwd();
chdir($path);
$text = `hg identify -n`;
chdir($cd);
chomp $text;
if ($text =~ /^(\d+)/)
{
return $1;
}
return 0;
}
sub SvnRevNum
{
my ($str)=(@_);
@ -123,4 +142,4 @@ sub SVN_Add
chdir($dir);
}
return 1;
return 1;

View File

@ -32,7 +32,7 @@ chdir(Build::PathFormat('../../OUTPUT/base'));
my ($version);
$version = Build::ProductVersion(Build::PathFormat('../../product.version'));
$version .= '.' . Build::Revision('../..');
$version .= '-hg' . Build::HgRevNum('../..');
my ($filename);
$filename = 'sourcemod-' . $version;

View File

@ -20,7 +20,7 @@ rsync('sourcemod@alliedmods.net:~/public_html/symbols/', '..\\..\\symstore');
#Get version info
my ($version);
$version = Build::ProductVersion(Build::PathFormat('product.version'));
$version .= '.' . Build::Revision('.');
$version .= '-hg' . Build::HgRevNum('.');
my ($line);
while (<PDBLOG>)