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

23 lines
452 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
.\.venv\Scripts\Activate.ps1
}
# Perform a git pull
git pull
# Run uv sync if .venv exists (already activated)
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
}