build: update version-bumper to support alpha (#30165)
* build: update version-bumper to support alpha * build: seperate alpha bump version tests For easier deletion. If we want to continue supporting an alpha channel, they can be reintegrated with main tests. * chore: fix regex Co-authored-by: Samuel Attard <sam@electronjs.org> Co-authored-by: Samuel Attard <sam@electronjs.org>
This commit is contained in:
parent
d35fb2a2e3
commit
deb75ceaa5
6 changed files with 231 additions and 84 deletions
|
@ -135,6 +135,9 @@ new Promise((resolve, reject) => {
|
|||
} else if (!release.prerelease) {
|
||||
// Tag the release with a `2-0-x` style tag
|
||||
npmTag = currentBranch;
|
||||
} else if (release.tag_name.indexOf('alpha') > 0) {
|
||||
// Tag the release with an `alpha-3-0-x` style tag
|
||||
npmTag = `alpha-${currentBranch}`;
|
||||
} else {
|
||||
// Tag the release with a `beta-3-0-x` style tag
|
||||
npmTag = `beta-${currentBranch}`;
|
||||
|
@ -175,6 +178,10 @@ new Promise((resolve, reject) => {
|
|||
semver.gt(localVersion, currentTags.beta)) {
|
||||
childProcess.execSync(`npm dist-tag add electron@${localVersion} beta --otp=${process.env.ELECTRON_NPM_OTP}`);
|
||||
}
|
||||
if (parsedLocalVersion.prerelease[0] === 'alpha' &&
|
||||
semver.gt(localVersion, currentTags.alpha)) {
|
||||
childProcess.execSync(`npm dist-tag add electron@${localVersion} alpha --otp=${process.env.ELECTRON_NPM_OTP}`);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue