Files
LibrarySystem/launch.cmd

26 lines
502 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 --no-dev
call .venv\Scripts\activate.bat
)
REM Perform a git pull
git pull
REM Run uv sync if .venv exists (already activated)
if exist .venv (
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
)