]> source.dussan.org Git - jquery-ui.git/commitdiff
Release: Abort on packager errors
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Fri, 6 Aug 2021 13:07:00 +0000 (15:07 +0200)
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Fri, 6 Aug 2021 13:07:00 +0000 (15:07 +0200)
build/release.js

index 0bc7f88c18f5138f1cc7268c57a2687b74a35afd..a870afb92335eea7cec301556260d0244a85b1cd 100644 (file)
@@ -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( {