Allow active deployment edits

This commit is contained in:
npc0-hue
2026-08-03 15:50:05 +08:00
parent cf4d0d0ba5
commit 5d4fca14f9
7 changed files with 65 additions and 28 deletions
@@ -29,7 +29,9 @@ if not exist "%STEAMCMD_EXE%" (
if errorlevel 1 exit /b 1
)
taskkill /IM SCUMServer.exe /F >nul 2>nul
call :resolve_scum_exe
if exist "%SCUM_EXE%" call :stop_matching_scum
if errorlevel 1 exit /b 1
pushd "%STEAMCMD_DIR%"
set "SCUM_STEAMCMD_RESULT=1"
@@ -58,6 +60,11 @@ if exist "%SCUM_EXE%" exit /b 0
set "SCUM_EXE=%SERVER_ROOT_WINDOWS%\SCUM Server\%SERVER_EXECUTABLE_REF:/=\%"
exit /b 0
:stop_matching_scum
if "%SCUM_EXE%"=="" exit /b 0
powershell -NoProfile -ExecutionPolicy Bypass -Command "$target=[IO.Path]::GetFullPath($env:SCUM_EXE); Get-CimInstance Win32_Process -Filter \"name='SCUMServer.exe'\" | Where-Object { $_.ExecutablePath -and ([IO.Path]::GetFullPath($_.ExecutablePath) -ieq $target) } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force }"
exit /b %ERRORLEVEL%
:default_steamcmd_dir
for %%I in ("%SERVER_ROOT_WINDOWS%") do set "SERVER_ROOT_DRIVE=%%~dI"
if "%SERVER_ROOT_DRIVE%"=="" (
+4 -1
View File
@@ -202,7 +202,10 @@ describe("plugin manifest validation", () => {
expect(installAction).toMatchObject({ executableKey: "bin/scum-install-update.cmd", environment: { SERVER_STEAM_APP_ID: "3792580", SERVER_STEAMCMD_UPDATE_ARGS: "+login anonymous +app_update 3792580 +quit" } });
expect(installAction.timeoutMs).toBe(7200000);
expect(startAction).toMatchObject({ executableKey: "bin/scum-start.cmd", environment: { SERVER_LOG_FLAG: "-log" } });
expect(installScript).toContain("taskkill /IM SCUMServer.exe /F");
expect(installScript).not.toContain("taskkill /IM SCUMServer.exe /F");
expect(installScript).toContain("call :stop_matching_scum");
expect(installScript).toContain("Get-CimInstance Win32_Process");
expect(installScript).toContain("[IO.Path]::GetFullPath($_.ExecutablePath) -ieq $target");
expect(installScript).toContain("SERVER_ROOT_WINDOWS=%SERVER_ROOT:/=\\%");
expect(installScript).toContain("SERVER_INSTALL_DIR=%SERVER_ROOT_WINDOWS%");
expect(installScript).toContain("SERVER_STEAMCMD_DIR=%SERVER_ROOT_DRIVE%\\steamcmd");