返回提交历史
Modified
UPDATE AND START SERVER.bat
+17
-14
Modified
UPDATE AND START SERVER.sh
+16
-15
XFEstudio/SpaceNinjaServer
chore: abort update and start scripts when .git folder is missing (#2702)
In that case, updating is obviously not possible. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2702 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
287acab8
代码差异
2 个文件
+33
-29
@@ -2,24 +2,27 @@
2
2
3
3
echo Updating SpaceNinjaServer...
4
4
git fetch --prune
5
git stash
6
git checkout -f origin/main
5
if %errorlevel% == 0 (
6
git stash
7
git checkout -f origin/main
7
8
8
if exist static\data\0\ (
9
echo Updating stripped assets...
10
cd static\data\0\
11
git pull
12
cd ..\..\..\
13
)
9
if exist static\data\0\ (
10
echo Updating stripped assets...
11
cd static\data\0\
12
git pull
13
cd ..\..\..\
14
)
14
15
15
echo Updating dependencies...
16
call npm i --omit=dev
16
echo Updating dependencies...
17
call npm i --omit=dev
17
18
18
call npm run build
19
if %errorlevel% == 0 (
20
call npm run start
21
echo SpaceNinjaServer seems to have crashed.
19
call npm run build
20
if %errorlevel% == 0 (
21
call npm run start
22
echo SpaceNinjaServer seems to have crashed.
23
)
22
24
)
25
23
26
:a
24
27
pause > nul
25
28
goto a
@@ -2,22 +2,23 @@
2
2
3
3
echo "Updating SpaceNinjaServer..."
4
4
git fetch --prune
5
git stash
6
git checkout -f origin/main
5
if [ $? -eq 0 ]; then
6
git stash
7
git checkout -f origin/main
7
8
8
if [ -d "static/data/0/" ]; then
9
echo "Updating stripped assets..."
10
cd static/data/0/
11
git pull
12
cd ../../../
13
fi
9
if [ -d "static/data/0/" ]; then
10
echo "Updating stripped assets..."
11
cd static/data/0/
12
git pull
13
cd ../../../
14
fi
14
15
15
echo "Updating dependencies..."
16
npm i --omit=dev
16
echo "Updating dependencies..."
17
npm i --omit=dev
17
18
18
npm run build
19
if [ $? -eq 0 ]; then
20
npm run start
21
echo "SpaceNinjaServer seems to have crashed."
19
npm run build
20
if [ $? -eq 0 ]; then
21
npm run start
22
echo "SpaceNinjaServer seems to have crashed."
23
fi
22
24
fi
23