From 7e968b1b86bde18aa6567f8ae76fdc5737b6e33c Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 27 Oct 2015 12:21:34 +0100 Subject: [PATCH 1/2] build(gulp): don't exit prematurely during cleanup Before this change we would exit while there were cleanup micro tasks scheduled for executions, this caused tmp files to be left over and consume a lot of space. Fixes #4441 --- gulpfile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index cf6eac22f67d..94ae0c972afc 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1295,8 +1295,9 @@ process.on('SIGINT', function() { runSequence('cleanup.builder', function () { process.exit(); }); + } else { + process.exit(); } - process.exit(); }); From 4170cc3a4d583a8577879db61170035e15fba496 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 27 Oct 2015 12:26:36 +0100 Subject: [PATCH 2/2] build(gulp): rename angularBuilder.mock to angularBuilder.uninitialized to prevent confusion with testing mocks --- gulpfile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 94ae0c972afc..b0095a26b983 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -73,7 +73,7 @@ var angularBuilder = { rebuildBrowserProdTree: throwToolsBuildMissingError, rebuildNodeTree: throwToolsBuildMissingError, rebuildDartTree: throwToolsBuildMissingError, - mock: true + uninitialized: true }; @@ -1291,7 +1291,7 @@ gulp.task('benchpress.bundle', ['build/clean.benchpress.bundle', 'build.js.cjs'] // register cleanup listener for ctrl+c/kill used to quit any persistent task (autotest or serve tasks) process.on('SIGINT', function() { - if (!angularBuilder.mock) { + if (!angularBuilder.uninitialized) { runSequence('cleanup.builder', function () { process.exit(); }); @@ -1309,7 +1309,7 @@ process.on('beforeExit', function() { beforeExitRan = true; - if (!angularBuilder.mock) { + if (!angularBuilder.uninitialized) { gulp.start('cleanup.builder'); } });