We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0858870 commit aab7ddeCopy full SHA for aab7dde
1 file changed
npm.ts
@@ -92,10 +92,20 @@ for await (const dir of Deno.readDir(root)) {
92
Deno.copyFileSync(`${base}/README.md`, `${outDir}/README.md`)
93
const publish = new Deno.Command('npm', {
94
args: ['publish', '--verbose'],
95
+ stderr: 'piped',
96
cwd: outDir,
97
})
98
const result = await publish.spawn().output()
99
if (result.code === 0) continue
100
+ const stderr = new TextDecoder().decode(result.stderr)
101
+ const isUpToDate = stderr.includes(
102
+ 'You cannot publish over the previously published versions',
103
+ )
104
+ if (isUpToDate) {
105
+ console.log('package version not changed, package skipped')
106
+ continue
107
+ }
108
console.log('failed to publish package')
109
+ console.error(stderr)
110
Deno.exit(1)
111
}
0 commit comments