SpaceNinjaServer/UPDATE AND START SERVER.bat
Sainan c3d7ae33c2
All checks were successful
Build / build (18) (push) Successful in 1m12s
Build Docker image / docker (push) Successful in 32s
Build / build (22) (push) Successful in 41s
Build / build (20) (push) Successful in 1m11s
chore: do 'git stash' before hard reset
Just in case the user made local changes and then runs the bat we don't wanna have it be irrecoverably lost.
2025-03-23 16:40:48 +01:00

27 lines
462 B
Batchfile

@echo off
echo Updating SpaceNinjaServer...
git config remote.origin.url https://openwf.io/SpaceNinjaServer.git
git fetch --prune
git stash
git reset --hard 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