@@ -812,21 +812,31 @@ For testing, use the files directly from mcpb-builds/ or upload as CI artifacts.
812812 buildAllPackages ( ) ;
813813
814814 // Build each package
815+ const failedPackages = [ ] ;
815816 for ( const packageName of targetPackages ) {
816- await buildPackage ( packageName ) ;
817+ try {
818+ await buildPackage ( packageName ) ;
819+ } catch ( err ) {
820+ console . error ( `❌ Skipping ${ packageName } , continuing with remaining packages...` ) ;
821+ failedPackages . push ( packageName ) ;
822+ }
817823 }
818-
824+
819825 // Note: Keep mcpb-builds directory for testing and CI artifacts
820826 // Don't clean up - let the files remain for use
821-
822- console . log ( '\n🎉 All packages built successfully!' ) ;
823-
827+
828+ if ( failedPackages . length === 0 ) {
829+ console . log ( '\n🎉 All packages built successfully!' ) ;
830+ } else {
831+ console . log ( `\n⚠️ Build completed with ${ failedPackages . length } failure(s): ${ failedPackages . join ( ', ' ) } ` ) ;
832+ }
833+
824834 // Show summary
825835 console . log ( '\n📊 Build Summary:' ) ;
826836 console . log ( '=' . repeat ( 50 ) ) ;
827837 for ( const packageName of targetPackages ) {
828838 const mcpbBuildsFile = path . join ( mcpbBuildsDir , packageName , `${ packageName } .mcpb` ) ;
829-
839+
830840 if ( fs . existsSync ( mcpbBuildsFile ) ) {
831841 console . log ( `${ packageName } .mcpb: ✅ mcpb-builds/${ packageName } /` ) ;
832842 } else {
@@ -839,7 +849,11 @@ For testing, use the files directly from mcpb-builds/ or upload as CI artifacts.
839849 console . log ( '2. For CI: Upload mcpb-builds/**/*.mcpb as artifacts' ) ;
840850 console . log ( '3. For releases: Attach mcpb-builds/**/*.mcpb to GitHub releases' ) ;
841851 console . log ( '4. If MCPB CLI is not installed: npm install -g @anthropic-ai/mcpb' ) ;
842-
852+
853+ if ( failedPackages . length > 0 ) {
854+ process . exit ( 1 ) ;
855+ }
856+
843857 } catch ( error ) {
844858 console . error ( '\n❌ Build failed:' , error . message ) ;
845859 process . exit ( 1 ) ;
0 commit comments