From 4089be3f937270fabad43a110186026419f164ee Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 10 Jun 2021 11:40:08 -0400 Subject: [PATCH] Remove rc, add comment Signed-off-by: Sebastian Malton --- build/set_build_version.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build/set_build_version.ts b/build/set_build_version.ts index 1bc5d2814c..8315d535bd 100644 --- a/build/set_build_version.ts +++ b/build/set_build_version.ts @@ -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);