chore: abort update and start scripts when .git folder is missing
All checks were successful
Build / build (pull_request) Successful in 59s
All checks were successful
Build / build (pull_request) Successful in 59s
In that case, updating is obviously not possible.
This commit is contained in:
parent
9d034824f7
commit
325f402536
@ -2,24 +2,27 @@
|
|||||||
|
|
||||||
echo Updating SpaceNinjaServer...
|
echo Updating SpaceNinjaServer...
|
||||||
git fetch --prune
|
git fetch --prune
|
||||||
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 (
|
if %errorlevel% == 0 (
|
||||||
call npm run start
|
git stash
|
||||||
echo SpaceNinjaServer seems to have crashed.
|
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
|
:a
|
||||||
pause > nul
|
pause > nul
|
||||||
goto a
|
goto a
|
||||||
|
|||||||
@ -2,22 +2,23 @@
|
|||||||
|
|
||||||
echo "Updating SpaceNinjaServer..."
|
echo "Updating SpaceNinjaServer..."
|
||||||
git fetch --prune
|
git fetch --prune
|
||||||
git stash
|
|
||||||
git checkout -f origin/main
|
|
||||||
|
|
||||||
if [ -d "static/data/0/" ]; then
|
|
||||||
echo "Updating stripped assets..."
|
|
||||||
cd static/data/0/
|
|
||||||
git pull
|
|
||||||
cd ../../../
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Updating dependencies..."
|
|
||||||
npm i --omit=dev
|
|
||||||
|
|
||||||
npm run build
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
npm run start
|
git stash
|
||||||
echo "SpaceNinjaServer seems to have crashed."
|
git checkout -f origin/main
|
||||||
fi
|
|
||||||
|
|
||||||
|
if [ -d "static/data/0/" ]; then
|
||||||
|
echo "Updating stripped assets..."
|
||||||
|
cd static/data/0/
|
||||||
|
git pull
|
||||||
|
cd ../../../
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Updating dependencies..."
|
||||||
|
npm i --omit=dev
|
||||||
|
|
||||||
|
npm run build
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
npm run start
|
||||||
|
echo "SpaceNinjaServer seems to have crashed."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user