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:
parent
189f017b2e
commit
3f01abbddf
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user