-
Notifications
You must be signed in to change notification settings - Fork 7
/
bootstrap.ps1
31 lines (25 loc) · 936 Bytes
/
bootstrap.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Check if running in PowerShell
if ($PSVersionTable -eq $null) {
Write-Host "Please run this script in PowerShell."
exit 1
}
# Define the virtual environment and requirements file paths
$repo_root = (Get-Location).Path
$venv_path = Join-Path $repo_root "venv"
$requirements_file = Join-Path $repo_root "requirements-dev.txt"
# Activate the virtual environment
$activate_script = Join-Path $venv_path "Scripts\Activate.ps1"
if (-Not (Test-Path $activate_script)) {
Write-Host "Virtual environment not found. Please ensure it exists at: $venv_path"
exit 1
}
Write-Host "Activating virtual environment..."
. $activate_script
# Install dependencies
if (-Not (Test-Path $requirements_file)) {
Write-Host "requirements-dev.txt not found at: $requirements_file"
exit 1
}
Write-Host "Installing dependencies from requirements-dev.txt..."
pip install -r $requirements_file
Write-Host "Bootstrap process complete."