diff --git a/lerna.json b/lerna.json index 4e480fe1f4..f8edafa311 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.0.999-alpha.35", + "version": "0.0.999-alpha.38", "npmClient": "yarn", "packages": [ "packages/backend-core", diff --git a/scripts/bumpVersion.js b/scripts/bumpVersion.js index 6853ee1338..7f68b44fc6 100644 --- a/scripts/bumpVersion.js +++ b/scripts/bumpVersion.js @@ -9,7 +9,7 @@ const lernaData = JSON.parse(fileData) // Get current version and split into major, minor, patch, and alpha components const currentVersion = lernaData.version -const [versionWithoutPrerelease, prerelease] = currentVersion.split("-") +const [versionWithoutPrerelease, alpha] = currentVersion.split("-") const [major, minor, patch] = versionWithoutPrerelease.split(".").map(Number) // Calculate new version based on specified version bump @@ -25,10 +25,13 @@ switch (versionBump) { newVersion = `${major}.${minor}.${patch + 1}` break case "alpha": - const newPrerelease = (prerelease || -1) + 1 - newVersion = prerelease - ? `${versionWithoutPrerelease}-alpha.${newPrerelease}` - : `${major}.${minor}.${patch}-alpha.${newPrerelease}` + let newAlphaVersion = 0 + if (alpha) { + const [_, alphaVersion] = alpha.split(".") + newAlphaVersion = +alphaVersion + 1 + } + newVersion = `${versionWithoutPrerelease}-alpha.${newAlphaVersion}` + break default: console.error(`Invalid version bump '${versionBump}' specified.`)