Skip to content

Commit dacc578

Browse files
committed
Alpha versions must not break with patches
1 parent 825fa42 commit dacc578

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.tools/build.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ async function getAlphaVersion(manifest){
4646
}
4747
const now = new Date();
4848
const date = `${now.getFullYear()}${f(now.getMonth() + 1)}${f(now.getDate())}`;
49-
const baseVersion = `${manifest.version}.${date}`;
49+
const versionParts = manifest.version.split(".");
50+
while (versionParts.length > 2){
51+
versionParts.pop();
52+
}
53+
const baseVersion = `${versionParts.join(".")}.${date}`;
5054
if (!fs.existsSync(path.join(versionsPath, getXPIFileName("canvasblocker_beta", baseVersion)))){
5155
return baseVersion;
5256
}

0 commit comments

Comments
 (0)