| 1 | @echo off |
| 2 | pushd %~dp0 |
| 3 | git --version > nul 2>&1 |
| 4 | if %errorlevel% neq 0 ( |
| 5 | echo [91mGit is not installed on this system.[0m |
| 6 | echo Install it from https://git-scm.com/downloads |
| 7 | goto end |
| 8 | ) else ( |
| 9 | if not exist .git ( |
| 10 | echo [91mNot running from a Git repository. Reinstall using an officially supported method to get updates.[0m |
| 11 | echo See: https://docs.sillytavern.app/installation/windows/ |
| 12 | goto end |
| 13 | ) |
| 14 | call git pull --rebase --autostash |
| 15 | if %errorlevel% neq 0 ( |
| 16 | REM incase there is still something wrong |
| 17 | echo [91mThere were errors while updating.[0m |
| 18 | echo See the update FAQ at https://docs.sillytavern.app/installation/updating/ |
| 19 | goto end |
| 20 | ) |
| 21 | ) |
| 22 | set NODE_ENV=production |
| 23 | call npm install --no-save --no-audit --no-fund --loglevel=error --no-progress --omit=dev --ignore-scripts |
| 24 | node server.js %* |
| 25 | :end |
| 26 | pause |
| 27 | popd |