1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Remove rc, add comment

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-06-10 11:40:08 -04:00
parent f03517e51d
commit 4089be3f93

View File

@ -29,11 +29,14 @@ const versionInfo = semver.parse(appInfo.version);
const buildNumber = process.env.BUILD_NUMBER || Date.now().toString();
function getBuildChannel(): string {
switch (versionInfo.prerelease[0]) {
/**
* Note: it is by design that we don't use `rc` as a build channel for these versions
*/
switch (versionInfo.prerelease?.[0]) {
case "beta":
return "beta";
case "rc":
return "rc";
case undefined:
return "latest";
default:
return "alpha";
}
@ -59,13 +62,10 @@ async function writeOutNewVersions() {
}
function main() {
const prereleaseParts: string[] = [];
const prereleaseParts: string[] = [getBuildChannel()];
if (versionInfo.prerelease) {
prereleaseParts.push(getBuildChannel());
prereleaseParts.push(versionInfo.prerelease[1].toString());
} else {
prereleaseParts.push("latest");
}
prereleaseParts.push(buildNumber);