-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathUPDATE-WINDOWS.cmd
More file actions
32 lines (27 loc) · 1.06 KB
/
UPDATE-WINDOWS.cmd
File metadata and controls
32 lines (27 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0"
REM ---- Read version from package.json ----
set "CODEXKIT_VERSION=unknown"
if exist "%~dp0package.json" (
for /f "usebackq delims=" %%v in (`powershell -NoProfile -Command "(Get-Content '%~dp0package.json' | ConvertFrom-Json).version"`) do (
set "CODEXKIT_VERSION=%%v"
)
)
:: ──────────────────────────────────────────
:: CodexKit Updater (Windows double-click)
:: ──────────────────────────────────────────
echo.
echo ================================================
echo CodexKit Updater (v%CODEXKIT_VERSION%)
echo ================================================
echo.
:: Check PowerShell
where pwsh >nul 2>&1
if %errorlevel%==0 (
pwsh -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\update-codexkit.ps1"
) else (
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\update-codexkit.ps1"
)
echo.
pause