Add buildStarted plugin hook
This commit is contained in:
@ -5,8 +5,21 @@ use Exporter;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(
|
||||
notifyBuildStarted
|
||||
notifyBuildFinished);
|
||||
|
||||
sub notifyBuildStarted {
|
||||
my ($plugins, $build) = @_;
|
||||
foreach my $plugin (@{$plugins}) {
|
||||
eval {
|
||||
$plugin->buildStarted($build);
|
||||
};
|
||||
if ($@) {
|
||||
print STDERR "$plugin->buildStarted: $@\n":
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub notifyBuildFinished {
|
||||
my ($plugins, $build, $dependents) = @_;
|
||||
foreach my $plugin (@{$plugins}) {
|
||||
|
@ -20,6 +20,11 @@ sub instantiate {
|
||||
return @$plugins;
|
||||
}
|
||||
|
||||
# Called when build $build has started.
|
||||
sub buildStarted {
|
||||
my ($self, $build) = @_;
|
||||
}
|
||||
|
||||
# Called when build $build has finished. If the build failed, then
|
||||
# $dependents is an array ref to a list of builds that have also
|
||||
# failed as a result (i.e. because they depend on $build or a failed
|
||||
|
Reference in New Issue
Block a user