1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-21 20:30:22 +01:00

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

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;
}