mirror of https://github.com/vuejs/core.git
chore: fix release vapor
This commit is contained in:
parent
b640bb70fc
commit
2486d991f1
|
@ -163,24 +163,26 @@ async function main() {
|
||||||
const pkgName = isCanary
|
const pkgName = isCanary
|
||||||
? renamePackageToCanary('vue')
|
? renamePackageToCanary('vue')
|
||||||
: renamePackageToVapor('vue')
|
: renamePackageToVapor('vue')
|
||||||
const { stdout } = await run(
|
if (isCanary) {
|
||||||
'pnpm',
|
const { stdout } = await run(
|
||||||
['view', `${pkgName}@~${newVersion}`, 'version', '--json'],
|
'pnpm',
|
||||||
{ stdio: 'pipe' },
|
['view', `${pkgName}@~${newVersion}`, 'version', '--json'],
|
||||||
)
|
{ stdio: 'pipe' },
|
||||||
let versions = JSON.parse(stdout)
|
|
||||||
versions = Array.isArray(versions) ? versions : [versions]
|
|
||||||
const latestSameDayPatch = /** @type {string} */ (
|
|
||||||
semver.maxSatisfying(versions, `~${newVersion}`)
|
|
||||||
)
|
|
||||||
|
|
||||||
newVersion = /** @type {string} */ (
|
|
||||||
semver.inc(latestSameDayPatch, 'patch')
|
|
||||||
)
|
|
||||||
if (args.tag && args.tag !== 'latest') {
|
|
||||||
newVersion = /** @type {string} */ (
|
|
||||||
semver.inc(latestSameDayPatch, 'prerelease', args.tag)
|
|
||||||
)
|
)
|
||||||
|
let versions = JSON.parse(stdout)
|
||||||
|
versions = Array.isArray(versions) ? versions : [versions]
|
||||||
|
const latestSameDayPatch = /** @type {string} */ (
|
||||||
|
semver.maxSatisfying(versions, `~${newVersion}`)
|
||||||
|
)
|
||||||
|
|
||||||
|
newVersion = /** @type {string} */ (
|
||||||
|
semver.inc(latestSameDayPatch, 'patch')
|
||||||
|
)
|
||||||
|
if (args.tag && args.tag !== 'latest') {
|
||||||
|
newVersion = /** @type {string} */ (
|
||||||
|
semver.inc(latestSameDayPatch, 'prerelease', args.tag)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (/** @type {any} */ e) {
|
} catch (/** @type {any} */ e) {
|
||||||
if (/E404/.test(e.message)) {
|
if (/E404/.test(e.message)) {
|
||||||
|
|
Loading…
Reference in New Issue