Make autobuild use latest changed branch.

This commit is contained in:
David Brown 2016-07-21 12:39:10 +01:00
parent c21975dc2a
commit 61eb8199d4
2 changed files with 3 additions and 2 deletions

View file

@ -6,6 +6,8 @@ use Cwd;
my $branch = "master";
if (defined($ARGV[0]) && ($ARGV[0] ne "")) {$branch = $ARGV[0]}
my %machines = (
"pi" => ['pi@pie', "sudo", "projects/oberon/vishap/voc", "make full"],
"darwin" => ['dave@dcb', "sudo", "projects/oberon/vishap/voc", "make full"],

View file

@ -36,7 +36,6 @@ for my $file (@{$modified}) {
if ($buildneeded) {
writelog "Post push github web hook for repository $repo, branch $branch, name $name. Build required.";
my $child = fork;
if (not defined $child) {die "Fork failed.";}
if ($child) {
@ -45,7 +44,7 @@ if ($buildneeded) {
close(STDIN); close(STDOUT); close(STDERR); # child process
system 'echo Syncing voc>postpush.log';
system '(cd voc && git pull) >>postpush.log';
exec 'perl voc/src/tools/make/buildall.pl >/tmp/buildall.log';
exec 'perl voc/src/tools/make/buildall.pl $branch >/tmp/buildall.log';
exit;
}
} else {