mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-19 16:47:21 -05:00
detect builds by checksum and purge all old code
This commit is contained in:
6
main.js
6
main.js
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user