Reviewed-on: #2749 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
30 lines
640 B
Bash
Executable File
30 lines
640 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Updating SpaceNinjaServer..."
|
|
git fetch --prune
|
|
if [ $? -eq 0 ]; then
|
|
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..."
|
|
node scripts/raw-precheck.js > /dev/null
|
|
if [ $? -eq 0 ]; then
|
|
npm i --omit=dev --omit=optional
|
|
npm run raw
|
|
else
|
|
npm i --omit=dev
|
|
npm run build
|
|
if [ $? -eq 0 ]; then
|
|
npm run start
|
|
fi
|
|
fi
|
|
echo "SpaceNinjaServer seems to have crashed."
|
|
fi
|