Skip to content

Commit 5294ddf

Browse files
committed
Release: Instantiate a zip archiver, run archivers async
1 parent f345291 commit 5294ddf

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

build/release.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,31 +73,30 @@ module.exports = function( Release ) {
7373
});
7474
}
7575

76-
function buildGoogleCDN( next ) {
77-
makeArchive( "googlecdn", googleFilesCDN, next );
76+
function buildGoogleCDN() {
77+
makeArchive( "googlecdn", googleFilesCDN );
7878
}
7979

80-
function buildMicrosoftCDN( next ) {
81-
makeArchive( "mscdn", msFilesCDN, next );
80+
function buildMicrosoftCDN() {
81+
makeArchive( "mscdn", msFilesCDN );
8282
}
8383

84-
function makeArchive( cdn, files, next ) {
84+
function makeArchive( cdn, files ) {
8585
if ( Release.preRelease ) {
8686
console.log( "Skipping archive creation for " + cdn + "; this is a beta release." );
8787
return;
8888
}
8989

9090
console.log( "Creating production archive for " + cdn );
9191

92-
var archiver = require( "archiver" ),
92+
var archiver = require( "archiver" )( "zip" ),
9393
md5file = cdnFolder + "/" + cdn + "-md5.txt",
9494
output = fs.createWriteStream( cdnFolder + "/" + cdn + "-jquery-" + Release.newVersion + ".zip" );
9595

9696
output.on( "error", function( err ) {
9797
throw err;
9898
});
9999

100-
output.on( "close", next );
101100
archiver.pipe( output );
102101

103102
files = files.map(function( item ) {
@@ -137,8 +136,10 @@ module.exports = function( Release ) {
137136
* Release completion
138137
*/
139138
complete: function() {
140-
// Build CDN archives
141-
Release._walk([ buildGoogleCDN, buildMicrosoftCDN, _complete ]);
139+
// Build CDN archives async
140+
buildGoogleCDN();
141+
buildMicrosoftCDN();
142+
_complete();
142143
},
143144
/**
144145
* Our trac milestones are different than the new version

0 commit comments

Comments
 (0)