File tree 2 files changed +27
-14
lines changed
2 files changed +27
-14
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,10 @@ const cwd = process.cwd()
55
55
) {
56
56
console . error ( 'Ignoring already published error' , platform )
57
57
} else {
58
- throw err
58
+ // throw err
59
59
}
60
60
}
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
62
62
execSync (
63
63
`git update-index --skip-worktree ${ path . join (
64
64
nativePackagesDir ,
@@ -81,12 +81,31 @@ const cwd = process.cwd()
81
81
path . join ( wasmDir , `pkg-${ wasmTarget } /package.json` ) ,
82
82
JSON . stringify ( wasmPkg , null , 2 )
83
83
)
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
+ }
90
109
}
91
110
92
111
// Update optional dependencies versions
Original file line number Diff line number Diff line change @@ -34,12 +34,6 @@ const cwd = process.cwd()
34
34
}
35
35
console . log ( `Publishing ${ isCanary ? 'canary' : 'stable' } ` )
36
36
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
-
43
37
const packagesDir = path . join ( cwd , 'packages' )
44
38
const packageDirs = await readdir ( packagesDir )
45
39
You can’t perform that action at this time.
0 commit comments