Files
LibrarySystem/launch.cmd
2025-01-24 10:51:00 +01:00

24 lines
470 B
Batchfile

@echo off
REM Check if .venv exists
if exist .venv (
REM Activate the virtual environment
call .venv\Scripts\activate.bat
) else (
REM Run uv sync if .venv does not exist
uv sync
call .venv\Scripts\activate.bat
)
REM Perform a git pull
git pull
REM Run uv sync if .venv exists (already activated)
uv sync --no-dev
REM Start main.py
uv run python main.py
REM Deactivate the virtual environment if it was activated
if exist .venv (
deactivate
)