Alpha versions must not break with patches

This commit is contained in:
kkapsner 2024-04-07 02:36:20 +02:00
parent 825fa42141
commit dacc578e12
1 changed files with 5 additions and 1 deletions

View File

@ -46,7 +46,11 @@ async function getAlphaVersion(manifest){
}
const now = new Date();
const date = `${now.getFullYear()}${f(now.getMonth() + 1)}${f(now.getDate())}`;
const baseVersion = `${manifest.version}.${date}`;
const versionParts = manifest.version.split(".");
while (versionParts.length > 2){
versionParts.pop();
}
const baseVersion = `${versionParts.join(".")}.${date}`;
if (!fs.existsSync(path.join(versionsPath, getXPIFileName("canvasblocker_beta", baseVersion)))){
return baseVersion;
}