electrobun 0.0.19-beta.89 → 0.0.19-beta.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/bun/core/Updater.ts +10 -8
- package/package.json +1 -1
|
@@ -465,19 +465,21 @@ const Updater = {
|
|
|
465
465
|
const launcherPath = join(parentDir, "run.bat");
|
|
466
466
|
const launcherContent = `@echo off
|
|
467
467
|
:: Electrobun App Launcher
|
|
468
|
-
:: This file launches the current version
|
|
468
|
+
:: This file launches the current version
|
|
469
469
|
|
|
470
470
|
:: Set current version
|
|
471
471
|
set CURRENT_HASH=${latestHash}
|
|
472
472
|
set APP_DIR=%~dp0app-%CURRENT_HASH%
|
|
473
473
|
|
|
474
|
-
::
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
474
|
+
:: TODO: Implement proper cleanup mechanism that checks for running processes
|
|
475
|
+
:: For now, old versions are kept to avoid race conditions during updates
|
|
476
|
+
:: :: Clean up old app versions (keep current and one backup)
|
|
477
|
+
:: for /d %%D in ("%~dp0app-*") do (
|
|
478
|
+
:: if not "%%~nxD"=="app-%CURRENT_HASH%" (
|
|
479
|
+
:: echo Removing old version: %%~nxD
|
|
480
|
+
:: rmdir /s /q "%%D" 2>nul
|
|
481
|
+
:: )
|
|
482
|
+
:: )
|
|
481
483
|
|
|
482
484
|
:: Launch the app
|
|
483
485
|
cd /d "%APP_DIR%\\bin"
|
package/package.json
CHANGED