diff --git a/lib/build.js b/lib/build.js index 4a334a6..3ca92b3 100644 --- a/lib/build.js +++ b/lib/build.js @@ -27,6 +27,7 @@ BuildsCollection.prototype.setDistributor = function(distributor) { this._proxyDistributorEvent('buildCompleted', 'buildCompleted'); this._proxyDistributorEvent('buildCanceled', 'buildCanceled'); this._proxyDistributorEvent('buildLogLines', 'buildLogLines'); + this._proxyDistributorEvent('buildScmUpdated', 'buildScmUpdated'); }; BuildsCollection.prototype._proxyDistributorEvent = function(source, dest) { diff --git a/lib/distributor.js b/lib/distributor.js index 1946a91..88f3879 100644 --- a/lib/distributor.js +++ b/lib/distributor.js @@ -257,6 +257,7 @@ Distributor.prototype._runNext = function(callback) { executor.once('scmData', function(scmData) { self._updateBuild(build, {scm: scmData}); + self.emit('buildScmUpdated', build); // run the same project again if we don't reach the latest rev if (!scmData.isLatest) { self.run({