mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +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}`)
|
||||
|
||||
// Do publish
|
||||
let { status, output } = spawnSync('npm', `publish --tag ${tag}`.split(' '))
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
String(spawnSync('npm', `publish --tag ${tag}`.split(' ')).stdout).trim()
|
||||
)
|
||||
console.log(String(output.concat('\n')).trim())
|
||||
|
||||
if (status === 1) {
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
// Run make start
|
||||
spawnSync('npm', 'run build:nuxt-start'.split(' '))
|
||||
|
||||
// Log
|
||||
// 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
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
String(spawnSync('npm', `publish --tag ${tag}`.split(' '), {
|
||||
cwd: resolve(__dirname, '..', 'start')
|
||||
}).stdout).trim()
|
||||
)
|
||||
console.log(String(output.concat('\n')).trim())
|
||||
|
||||
if (status === 1) {
|
||||
process.exit(1)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user