Synced buildbot from trunk to branch.

--HG--
branch : sourcemod-1.0.x
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.0.x%402515
This commit is contained in:
David Anderson 2008-09-06 23:57:23 +00:00
parent cc0f68f94e
commit fbc29dce23
5 changed files with 76 additions and 10 deletions

View File

@ -45,6 +45,7 @@ if ($^O eq "linux")
else
{
print CONF "BuilderPath = " . $ENV{'MSVC8'} . "\n";
print CONF "PDBLog = $root\\OUTPUT\\pdblog.txt\n";
}
close(CONF);

View File

@ -8,14 +8,12 @@ package Build;
our $SVN = "/usr/bin/svn";
our $SVN_USER = 'dvander';
our $SVN_ARGS = '';
our $SVN_VERSION = "/usr/bin/svnversion";
sub Revision
{
my ($str)=(@_);
my $dir = $SVN_VERSION;
my $data = Command($dir . ' -c ' . $str);
my $data = Command('svnversion -c ' . $str);
if ($data =~ /(\d+):(\d+)/)
{
return $2;
@ -26,6 +24,17 @@ sub Revision
}
}
sub ProductVersion
{
my ($file) = (@_);
my ($version);
open(FILE, $file) or die "Could not open $file: $!\n";
$version = <FILE>;
close(FILE);
chomp $version;
return $version;
}
sub Delete
{
my ($str)=(@_);
@ -114,3 +123,4 @@ sub SVN_Add
chdir($dir);
}
return 1;

View File

@ -42,7 +42,7 @@ c['slavePortnum'] = 0000
# put here: there are several in buildbot/changes/*.py to choose from.
from buildbot.changes.pb import PBChangeSource
c['change_source'] = PBChangeSource(prefix = '/am/sourcemod/')
c['change_source'] = PBChangeSource()
# For example, if you had CVSToys installed on your repository, and your
# CVSROOT/freshcfg file had an entry like this:
@ -114,8 +114,11 @@ from buildbot.steps.transfer import FileDownload
from buildbot.steps.source import SVN
from buildbot.process.properties import WithProperties
from buildbot.steps.python_twisted import Trial
from buildbot import locks
def create_factory(sep):
pdb_lock = locks.MasterLock("symbolstore")
def create_factory(sep, os):
f1 = factory.BuildFactory()
f1.addStep(SVN(baseURL = "svn://svn.alliedmods.net/am/sourcemod/",
mode = "copy"
@ -144,10 +147,19 @@ def create_factory(sep):
description = "packaging",
descriptionDone = "uploaded"
))
if os == "win32":
f1.addStep(ShellCommand(
haltOnFailure = 1,
locks = [pdb_lock],
name = "symstore",
command = ["tools" + sep + "buildbot" + sep + "symstore.pl"],
description = "symstore",
descriptionDone = "symstore"
))
return f1
facWin = create_factory("\\")
facLinux = create_factory("/")
facWin = create_factory("\\", "win32")
facLinux = create_factory("/", "linux")
buildLinuxStable = {
'name': 'linux-stable',

View File

@ -31,8 +31,7 @@ chdir(Build::PathFormat('../../OUTPUT/base'));
my ($version);
$version = `cat ../../product.version`;
chomp $version;
$version = Build::ProductVersion(Build::PathFormat('../../product.version'));
$version .= '.' . Build::Revision('../..');
my ($filename);

View File

@ -0,0 +1,44 @@
#!/usr/bin/perl
use File::Basename;
my ($myself, $path) = fileparse($0);
chdir($path);
require 'helpers.pm';
chdir('..');
chdir('..');
our $SSH = 'ssh -i ../../smpvkey';
open(PDBLOG, 'OUTPUT/pdblog.txt') or die "Could not open pdblog.txt: $!\n";
#Sync us up with the main symbol store
rsync('sourcemod@alliedmods.net:~/public_html/symbols/', '..\\..\\symstore');
#Get version info
my ($version);
$version = Build::ProductVersion(Build::PathFormat('product.version'));
$version .= '.' . Build::Revision('.');
my ($line);
while (<PDBLOG>)
{
$line = $_;
$line =~ s/\.pdb/\*/;
chomp $line;
Build::Command("symstore add /r /f \"$line\" /s ..\\..\\symstore /t \"SourceMod\" /v \"$version\" /c \"buildbot\"");
}
close(PDBLOG);
#Now that we're done, rsync back.
rsync('../../symstore/', 'sourcemod@alliedmods.net:~/public_html/symbols');
sub rsync
{
my ($from, $to) = (@_);
Build::Command('rsync -av --delete -e="' . $SSH . '" ' . $from . ' ' . $to);
}