2023-07-20 19:32:15 +02:00
|
|
|
|
@echo off
|
|
|
|
|
pushd %~dp0
|
|
|
|
|
git --version > nul 2>&1
|
|
|
|
|
if %errorlevel% neq 0 (
|
2024-10-01 11:32:32 +02:00
|
|
|
|
echo [91mGit is not installed on this system.[0m
|
|
|
|
|
echo Install it from https://git-scm.com/downloads
|
|
|
|
|
goto end
|
2023-07-20 19:32:15 +02:00
|
|
|
|
) else (
|
2024-10-01 11:32:32 +02:00
|
|
|
|
if not exist .git (
|
|
|
|
|
echo [91mNot running from a Git repository. Reinstall using an officially supported method to get updates.[0m
|
|
|
|
|
echo See: https://docs.sillytavern.app/installation/windows/
|
|
|
|
|
goto end
|
|
|
|
|
)
|
2023-07-20 19:32:15 +02:00
|
|
|
|
call git pull --rebase --autostash
|
|
|
|
|
if %errorlevel% neq 0 (
|
|
|
|
|
REM incase there is still something wrong
|
2024-10-01 11:43:20 +02:00
|
|
|
|
echo [91mThere were errors while updating.[0m
|
|
|
|
|
echo See the update FAQ at https://docs.sillytavern.app/usage/update/#common-update-problems
|
|
|
|
|
goto end
|
2023-07-20 19:32:15 +02:00
|
|
|
|
)
|
|
|
|
|
)
|
2024-03-06 21:09:31 +01:00
|
|
|
|
set NODE_ENV=production
|
2024-09-19 17:42:07 +02:00
|
|
|
|
call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev
|
2024-01-13 16:55:48 +01:00
|
|
|
|
node server.js %*
|
2024-10-01 11:32:32 +02:00
|
|
|
|
:end
|
2023-07-20 19:32:15 +02:00
|
|
|
|
pause
|
|
|
|
|
popd
|