Skip to content

Commit

Permalink
build: adjust release tag for alpha/beta phase
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 6, 2020
1 parent 84dc5a6 commit 8aca71b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand All @@ -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(
Expand Down

0 comments on commit 8aca71b

Please sign in to comment.