From 5294ddf68fbb68e6b71ff61d3be0a19dc1aa3f18 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Thu, 23 Jan 2014 15:45:23 -0500 Subject: [PATCH] Release: Instantiate a zip archiver, run archivers async --- build/release.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/build/release.js b/build/release.js index e00ca879c..116264ed5 100644 --- a/build/release.js +++ b/build/release.js @@ -73,15 +73,15 @@ module.exports = function( Release ) { }); } - function buildGoogleCDN( next ) { - makeArchive( "googlecdn", googleFilesCDN, next ); + function buildGoogleCDN() { + makeArchive( "googlecdn", googleFilesCDN ); } - function buildMicrosoftCDN( next ) { - makeArchive( "mscdn", msFilesCDN, next ); + function buildMicrosoftCDN() { + makeArchive( "mscdn", msFilesCDN ); } - function makeArchive( cdn, files, next ) { + function makeArchive( cdn, files ) { if ( Release.preRelease ) { console.log( "Skipping archive creation for " + cdn + "; this is a beta release." ); return; @@ -89,7 +89,7 @@ module.exports = function( Release ) { console.log( "Creating production archive for " + cdn ); - var archiver = require( "archiver" ), + var archiver = require( "archiver" )( "zip" ), md5file = cdnFolder + "/" + cdn + "-md5.txt", output = fs.createWriteStream( cdnFolder + "/" + cdn + "-jquery-" + Release.newVersion + ".zip" ); @@ -97,7 +97,6 @@ module.exports = function( Release ) { throw err; }); - output.on( "close", next ); archiver.pipe( output ); files = files.map(function( item ) { @@ -137,8 +136,10 @@ module.exports = function( Release ) { * Release completion */ complete: function() { - // Build CDN archives - Release._walk([ buildGoogleCDN, buildMicrosoftCDN, _complete ]); + // Build CDN archives async + buildGoogleCDN(); + buildMicrosoftCDN(); + _complete(); }, /** * Our trac milestones are different than the new version -- 2.39.5