Files
SillyTavern/UpdateAndStart.bat
Cohee 8e8f501279 Immutable public and global content management (#5390)
* Use custom init script instead of postinstall

* Revert changes to start scripts in src\electron

* Add global data to content manager

* Add migration for public overrides and user.css location update

* Update npm publish workflow to use 'omit=dev' flag in npm ci commands

* Rename user.css readme file

* Fix indentation in userCssMiddleware function

* Add directory creation for content target

* Restore template compile location

* Move stylesheet up in index.json

* Use path.resolve for user.css file path in userCssMiddleware

* Correct capitalization in "Not Found" error page title and heading

* Remove init run from startup scripts

* Simplify user CSS file path resolution

* Update userCssMiddleware comment
2026-04-05 19:32:28 +03:00

28 lines
889 B
Batchfile

@echo off
pushd %~dp0
git --version > nul 2>&1
if %errorlevel% neq 0 (
echo Git is not installed on this system.
echo Install it from https://git-scm.com/downloads
goto end
) else (
if not exist .git (
echo Not running from a Git repository. Reinstall using an officially supported method to get updates.
echo See: https://docs.sillytavern.app/installation/windows/
goto end
)
call git pull --rebase --autostash
if %errorlevel% neq 0 (
REM incase there is still something wrong
echo There were errors while updating.
echo See the update FAQ at https://docs.sillytavern.app/installation/updating/
goto end
)
)
set NODE_ENV=production
call npm install --no-save --no-audit --no-fund --loglevel=error --no-progress --omit=dev --ignore-scripts
node server.js %*
:end
pause
popd