File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,24 @@ for (const REGISTRY of registries) {
8787 process . exit ( 1 ) ;
8888 }
8989
90- for ( const PACKAGE of packages ) {
91- console . log ( `⤴ Publish ${ PACKAGE } with tag ${ TAG } to ${ REGISTRY } ` ) ;
92- execSync (
93- `npm publish --tag ${ TAG } db-ux-${ PACKAGE } -${ VALID_SEMVER_VERSION } .tgz --provenance`
94- ) ;
90+ // We do a try-run to check if everything is alright
91+
92+ for ( const step of [ 'dry-run' , 'provenance' ] ) {
93+ for ( const PACKAGE of packages ) {
94+ console . log (
95+ `⤴ (${ step } ) Publish ${ PACKAGE } with tag ${ TAG } to ${ REGISTRY } `
96+ ) ;
97+ try {
98+ execSync (
99+ `npm publish --tag ${ TAG } db-ux-${ PACKAGE } -${ VALID_SEMVER_VERSION } .tgz --${ step } `
100+ ) ;
101+ } catch ( error ) {
102+ console . error (
103+ `❌ ${ step } publish failed for ${ PACKAGE } with tag ${ TAG } to ${ REGISTRY } `
104+ ) ;
105+ console . error ( error . message || error ) ;
106+ process . exit ( 1 ) ;
107+ }
108+ }
95109 }
96110}
You can’t perform that action at this time.
0 commit comments