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

don't set prerelease version info when non-prerelease (#3261)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-07-05 10:57:49 +03:00 committed by GitHub
parent 189f017b2e
commit 3f01abbddf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,8 +36,6 @@ function getBuildChannel(): string {
case "rc":
case "beta":
return "beta";
case undefined:
return "latest";
default:
return "alpha";
}
@ -63,16 +61,16 @@ async function writeOutNewVersions() {
}
function main() {
const prereleaseParts: string[] = [getBuildChannel()];
if (versionInfo.prerelease && versionInfo.prerelease.length > 1) {
const prereleaseParts: string[] = [getBuildChannel()];
prereleaseParts.push(versionInfo.prerelease[1].toString());
prereleaseParts.push(buildNumber);
appInfo.version = `${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}-${prereleaseParts.join(".")}`;
} else {
appInfo.version = `${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}+${buildNumber}`;
}
prereleaseParts.push(buildNumber);
appInfo.version = `${versionInfo.major}.${versionInfo.minor}.${versionInfo.patch}-${prereleaseParts.join(".")}`;
writeOutNewVersions()
.catch((error) => {
console.error(error);