Files
LibrarySystem/launch.ps1

25 lines
490 B
PowerShell

# Check if .venv exists
if (Test-Path .venv) {
# Activate the virtual environment
.\.venv\Scripts\Activate.ps1
} else {
# Run uv sync if .venv does not exist
uv sync --no-dev
.\.venv\Scripts\Activate.ps1
}
# Perform a git pull
git pull
# Run uv sync if .venv exists (already activated)
if (Test-Path .venv) {
uv sync --no-dev
}
# Start main.py
uv run python main.py
# Deactivate the virtual environment if it was activated
if (Test-Path .venv) {
deactivate
}