chore: only update version when minAppVersion changes

This commit is contained in:
moz 2026-06-04 19:38:07 +08:00
parent 44f5888e4f
commit 1b4a2cdb60

View file

@ -15,5 +15,9 @@ if (existsSync("manifest-beta.json")) {
}
let versions = JSON.parse(readFileSync("versions.json", "utf8"));
versions[targetVersion] = minAppVersion;
writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));
// Only update versions.json when minAppVersion changes
const latestVersion = Object.keys(versions).sort().pop();
if (!latestVersion || versions[latestVersion] !== minAppVersion) {
versions[targetVersion] = minAppVersion;
writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));
}