File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,10 +55,10 @@ const cwd = process.cwd()
5555 ) {
5656 console . error ( 'Ignoring already published error' , platform )
5757 } else {
58- throw err
58+ // throw err
5959 }
6060 }
61- // lerna publish in next step will fail if git status is not clean
61+ // lerna publish in next step sill fail if git status is not clean
6262 execSync (
6363 `git update-index --skip-worktree ${ path . join (
6464 nativePackagesDir ,
@@ -81,12 +81,31 @@ const cwd = process.cwd()
8181 path . join ( wasmDir , `pkg-${ wasmTarget } /package.json` ) ,
8282 JSON . stringify ( wasmPkg , null , 2 )
8383 )
84- execSync (
85- `npm publish ${ path . join (
86- wasmDir ,
87- `pkg-${ wasmTarget } `
88- ) } --access public ${ gitref . includes ( 'canary' ) ? ' --tag canary' : '' } `
89- )
84+
85+ try {
86+ execSync (
87+ `npm publish ${ path . join (
88+ wasmDir ,
89+ `pkg-${ wasmTarget } `
90+ ) } --access public ${
91+ gitref . includes ( 'canary' ) ? ' --tag canary' : ''
92+ } `
93+ )
94+ } catch ( err ) {
95+ // don't block publishing other versions on single platform error
96+ console . error ( `Failed to publish` , wasmTarget )
97+
98+ if (
99+ err . message &&
100+ err . message . includes (
101+ 'You cannot publish over the previously published versions'
102+ )
103+ ) {
104+ console . error ( 'Ignoring already published error' , wasmTarget )
105+ } else {
106+ // throw err
107+ }
108+ }
90109 }
91110
92111 // Update optional dependencies versions
Original file line number Diff line number Diff line change @@ -34,12 +34,6 @@ const cwd = process.cwd()
3434 }
3535 console . log ( `Publishing ${ isCanary ? 'canary' : 'stable' } ` )
3636
37- // TODO: remove after testing, this is a safe guard to ensure we
38- // don't publish stable unexpectedly
39- if ( ! isCanary ) {
40- return
41- }
42-
4337 const packagesDir = path . join ( cwd , 'packages' )
4438 const packageDirs = await readdir ( packagesDir )
4539
You can’t perform that action at this time.
0 commit comments