mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
feat: fail release job if publish failed (#3604)
This commit is contained in:
parent
ce09961ea5
commit
52d9841c9a
@ -48,22 +48,30 @@ if (tag === 'dev') {
|
|||||||
console.log(`publishing ${p.name}@${p.version} with tag ${tag}`)
|
console.log(`publishing ${p.name}@${p.version} with tag ${tag}`)
|
||||||
|
|
||||||
// Do publish
|
// Do publish
|
||||||
|
let { status, output } = spawnSync('npm', `publish --tag ${tag}`.split(' '))
|
||||||
|
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(
|
console.log(String(output.concat('\n')).trim())
|
||||||
String(spawnSync('npm', `publish --tag ${tag}`.split(' ')).stdout).trim()
|
|
||||||
)
|
if (status === 1) {
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
// Run make start
|
// Run make start
|
||||||
spawnSync('npm', 'run build:nuxt-start'.split(' '))
|
spawnSync('npm', 'run build:nuxt-start'.split(' '))
|
||||||
|
|
||||||
// Log
|
// Log
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(`publishing ${p.name}-start@${p.version} with tag ${tag}`)
|
console.log(`publishing ${p.name}-start@${p.version} with tag ${tag}`);
|
||||||
|
|
||||||
|
({ status, output } = spawnSync('npm', `publish --tag ${tag}`.split(' '), {
|
||||||
|
cwd: resolve(__dirname, '..', 'start')
|
||||||
|
}))
|
||||||
|
|
||||||
// Do publish
|
// Do publish
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(
|
console.log(String(output.concat('\n')).trim())
|
||||||
String(spawnSync('npm', `publish --tag ${tag}`.split(' '), {
|
|
||||||
cwd: resolve(__dirname, '..', 'start')
|
if (status === 1) {
|
||||||
}).stdout).trim()
|
process.exit(1)
|
||||||
)
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user