SpaceNinjaServer/UPDATE AND START SERVER.bat
Sainan 287acab892 chore: abort update and start scripts when .git folder is missing (#2702)
In that case, updating is obviously not possible.

Reviewed-on: OpenWF/SpaceNinjaServer#2702
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
2025-08-27 01:30:19 -07:00

29 lines
434 B
Batchfile

@echo off
echo Updating SpaceNinjaServer...
git fetch --prune
if %errorlevel% == 0 (
git stash
git checkout -f origin/main
if exist static\data\0\ (
echo Updating stripped assets...
cd static\data\0\
git pull
cd ..\..\..\
)
echo Updating dependencies...
call npm i --omit=dev
call npm run build
if %errorlevel% == 0 (
call npm run start
echo SpaceNinjaServer seems to have crashed.
)
)
:a
pause > nul
goto a