mirror of https://github.com/vuejs/core.git
chore: avoid unncessary print on release script exit [ci skip]
This commit is contained in:
parent
9058853411
commit
e5844aafb6
|
@ -9,6 +9,8 @@ import { execa } from 'execa'
|
||||||
import { createRequire } from 'node:module'
|
import { createRequire } from 'node:module'
|
||||||
import { fileURLToPath } from 'node:url'
|
import { fileURLToPath } from 'node:url'
|
||||||
|
|
||||||
|
let versionUpdated = false
|
||||||
|
|
||||||
const { prompt } = enquirer
|
const { prompt } = enquirer
|
||||||
const currentVersion = createRequire(import.meta.url)('../package.json').version
|
const currentVersion = createRequire(import.meta.url)('../package.json').version
|
||||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||||
|
@ -219,6 +221,7 @@ async function main() {
|
||||||
targetVersion,
|
targetVersion,
|
||||||
isCanary ? renamePackageToCanary : keepThePackageName
|
isCanary ? renamePackageToCanary : keepThePackageName
|
||||||
)
|
)
|
||||||
|
versionUpdated = true
|
||||||
|
|
||||||
// build all packages with types
|
// build all packages with types
|
||||||
step('\nBuilding all packages...')
|
step('\nBuilding all packages...')
|
||||||
|
@ -418,7 +421,10 @@ async function publishPackage(pkgName, version) {
|
||||||
}
|
}
|
||||||
|
|
||||||
main().catch(err => {
|
main().catch(err => {
|
||||||
|
if (versionUpdated) {
|
||||||
|
// revert to current version on failed releases
|
||||||
updateVersions(currentVersion)
|
updateVersions(currentVersion)
|
||||||
|
}
|
||||||
console.error(err)
|
console.error(err)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue