Files
LibrarySystem/launch.cmd

24 lines
461 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
REM Start main.py
uv run python main.py
REM Deactivate the virtual environment if it was activated
if exist .venv (
deactivate
)