detect builds by checksum and purge all old code

This commit is contained in:
2026-08-20 19:11:39 -07:00
parent 7c5455e2d2
commit 64194d9ea4
2 changed files with 20 additions and 6 deletions

View File

@@ -563,7 +563,7 @@ button:active {
patcher.applyPatches(replacementsConfig);
patcher.bridgeCredentials(serviceManager.credentialManager);
patcher.saveCurrentVersion(release.version);
patcher.saveCurrentVersion(release.version, release.sha256);
fs.unlinkSync(tempZipPath);
downloadSuccess = true;
@@ -580,12 +580,14 @@ button:active {
try {
const isFirstRun = !patcher.verifyExtraction();
const localVersion = patcher.getCurrentVersion();
const localSha = patcher.getCurrentSha();
const release = await updateClient.checkForUpdates();
const hasUpdate = release.version !== localVersion || (release.sha256 && release.sha256 !== localSha);
if (isFirstRun) {
await installBuild(release);
} else if (release.version !== localVersion) {
} else if (hasUpdate) {
const choice = await showUpdatePrompt(localVersion, release.version);
if (choice === 'install') {
await installBuild(release);