forked from OpenWF/SpaceNinjaServer
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>
This commit is contained in:
parent
30398021b3
commit
287acab892
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
echo Updating SpaceNinjaServer...
|
echo Updating SpaceNinjaServer...
|
||||||
git fetch --prune
|
git fetch --prune
|
||||||
|
if %errorlevel% == 0 (
|
||||||
git stash
|
git stash
|
||||||
git checkout -f origin/main
|
git checkout -f origin/main
|
||||||
|
|
||||||
@ -20,6 +21,8 @@ if %errorlevel% == 0 (
|
|||||||
call npm run start
|
call npm run start
|
||||||
echo SpaceNinjaServer seems to have crashed.
|
echo SpaceNinjaServer seems to have crashed.
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
:a
|
:a
|
||||||
pause > nul
|
pause > nul
|
||||||
goto a
|
goto a
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
echo "Updating SpaceNinjaServer..."
|
echo "Updating SpaceNinjaServer..."
|
||||||
git fetch --prune
|
git fetch --prune
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
git stash
|
git stash
|
||||||
git checkout -f origin/main
|
git checkout -f origin/main
|
||||||
|
|
||||||
@ -20,4 +21,4 @@ if [ $? -eq 0 ]; then
|
|||||||
npm run start
|
npm run start
|
||||||
echo "SpaceNinjaServer seems to have crashed."
|
echo "SpaceNinjaServer seems to have crashed."
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user