XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
UTF-8
@echo off

echo Updating SpaceNinjaServer...
git fetch --prune
if %errorlevel% == 0 (
	git restore package-lock.json
	git stash
	git checkout -f origin/main

	if exist static\data\stripped-assets\ (
		echo Updating stripped assets...
		cd static\data\stripped-assets\
		git pull
		cd ..\..\..\
	) else if exist static\data\0\ (
		echo Updating stripped assets...
		cd static\data\0\
		git pull
		cd ..\..\..\
	)

	echo Updating dependencies...
	node scripts/raw-precheck.js > NUL
	if %errorlevel% == 0 (
		call npm i --omit=dev --omit=optional --no-audit
		call npm run raw
	) else (
		call npm i --omit=dev --no-audit
		call npm run build
		if %errorlevel% == 0 (
			call npm run start
		)
	)
	echo SpaceNinjaServer seems to have crashed.
)

:a
pause > nul
goto a