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
|
@ -71,13 +71,20 @@ async function main () {
|
|||
console.log(`Bumped to version: ${version}`);
|
||||
}
|
||||
|
||||
// get next version for release based on [nightly, beta, stable]
|
||||
// get next version for release based on [nightly, alpha, beta, stable]
|
||||
async function nextVersion (bumpType, version) {
|
||||
if (versionUtils.isNightly(version) || versionUtils.isBeta(version)) {
|
||||
if (
|
||||
versionUtils.isNightly(version) ||
|
||||
versionUtils.isAlpha(version) ||
|
||||
versionUtils.isBeta(version)
|
||||
) {
|
||||
switch (bumpType) {
|
||||
case 'nightly':
|
||||
version = await versionUtils.nextNightly(version);
|
||||
break;
|
||||
case 'alpha':
|
||||
version = await versionUtils.nextAlpha(version);
|
||||
break;
|
||||
case 'beta':
|
||||
version = await versionUtils.nextBeta(version);
|
||||
break;
|
||||
|
@ -92,6 +99,8 @@ async function nextVersion (bumpType, version) {
|
|||
case 'nightly':
|
||||
version = versionUtils.nextNightly(version);
|
||||
break;
|
||||
case 'alpha':
|
||||
throw new Error('Cannot bump to alpha from stable.');
|
||||
case 'beta':
|
||||
throw new Error('Cannot bump to beta from stable.');
|
||||
case 'minor':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue