build: adjust release tag for alpha/beta phase

This commit is contained in:
Evan You 2020-01-06 12:09:37 -05:00
parent 84dc5a6862
commit 8aca71b354

View File

@ -113,9 +113,8 @@ async function main() {
// publish packages
step('\nPublishing packages...')
const releaseTag = semver.prerelease(targetVersion)[0] || 'latest'
for (const pkg of packages) {
await publishPackage(pkg, targetVersion, releaseTag, runIfNotDry)
await publishPackage(pkg, targetVersion, runIfNotDry)
}
// push to GitHub
@ -172,7 +171,7 @@ function updateDeps(pkg, depType, version) {
})
}
async function publishPackage(pkgName, version, releaseTag, runIfNotDry) {
async function publishPackage(pkgName, version, runIfNotDry) {
if (skippedPackages.includes(pkgName)) {
return
}
@ -183,6 +182,14 @@ async function publishPackage(pkgName, version, releaseTag, runIfNotDry) {
return
}
// for now (alpha/beta phase), every package except "vue" can be published as
// `latest`, whereas "vue" will be published under the "next" tag.
const releaseTag =
pkgName === 'vue' ? 'next' : semver.prerelease(version)[0] || 'latest'
// TODO use inferred release channel after offcial 3.0 release
// const releaseTag = semver.prerelease(version)[0] || 'latest'
step(`Publishing ${pkg}...`)
try {
await runIfNotDry(