From 03e6c45583d0130b2640bd6383448af76598451b Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski-Owczarek Date: Fri, 6 Aug 2021 15:07:00 +0200 Subject: Release: Abort on packager errors --- build/release.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/build/release.js b/build/release.js index 0bc7f88c1..a870afb92 100644 --- a/build/release.js +++ b/build/release.js @@ -84,18 +84,22 @@ function buildCDNPackage( callback ) { jqueryUi: jqueryUi, themeVars: null } ); - packager.ready.then( function() { - removeExternals( packager ); - addManifest( packager ); - packager.toZip( target, { - basedir: "" - }, function( error ) { - if ( error ) { - Release.abort( "Failed to zip CDN package", error ); - } - callback(); + packager.ready + .then( function() { + removeExternals( packager ); + addManifest( packager ); + packager.toZip( target, { + basedir: "" + }, function( error ) { + if ( error ) { + Release.abort( "Failed to zip the CDN package", error ); + } + callback(); + } ); + } ) + .catch( function( error ) { + Release.abort( "Failed to create the CDN package", error ); } ); - } ); } Release.define( { -- cgit v1.2.3