-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbootstrap.ps1
More file actions
51 lines (41 loc) · 1.8 KB
/
Copy pathbootstrap.ps1
File metadata and controls
51 lines (41 loc) · 1.8 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<#
.SYNOPSIS
Aetherra Alpha bootstrap (Windows PowerShell).
.DESCRIPTION
Creates virtual environment, installs project (editable), runs smoke & regression fast tests.
.PARAMETERS
-Version <string> (optional) override version env AETHERRA_VERSION.
.EXAMPLE
./scripts/bootstrap.ps1 -Version 0.1.0-alpha.1
#>
[CmdletBinding()]
param(
[string]$Version = ""
)
Write-Host "[BOOTSTRAP] Starting Aetherra bootstrap (PowerShell)" -ForegroundColor Cyan
# Ensure python
$python = Get-Command python -ErrorAction SilentlyContinue
if (-not $python) { Write-Error "python not found in PATH"; exit 2 }
# Virtual env
if (-not (Test-Path .venv)) {
Write-Host "[BOOTSTRAP] Creating virtual environment .venv" -ForegroundColor Yellow
python -m venv .venv
if ($LASTEXITCODE -ne 0) { Write-Error "venv creation failed"; exit 2 }
}
. .\.venv\Scripts\Activate.ps1
Write-Host "[BOOTSTRAP] Upgrading pip/setuptools/wheel" -ForegroundColor Yellow
python -m pip install --upgrade pip setuptools wheel >$null
Write-Host "[BOOTSTRAP] Installing project (editable) + dev extras" -ForegroundColor Yellow
python -m pip install -e ".[dev]"
if ($LASTEXITCODE -ne 0) { Write-Error "install failed"; exit 2 }
if ($Version) { $env:AETHERRA_VERSION = $Version }
Write-Host "[BOOTSTRAP] Running smoke test" -ForegroundColor Yellow
python tools/os_smoke.py --profile test
if ($LASTEXITCODE -ne 0) { Write-Error "smoke failed"; exit 3 }
Write-Host "[BOOTSTRAP] Running regression fast set" -ForegroundColor Yellow
python tools/run_regression_suite.py
if ($LASTEXITCODE -ne 0) { Write-Error "regression failed"; exit 4 }
Write-Host "[BOOTSTRAP] Running quality gates" -ForegroundColor Yellow
python tools/quality_gates.py
if ($LASTEXITCODE -ne 0) { Write-Error "quality gates failed"; exit 5 }
Write-Host "[BOOTSTRAP] Success" -ForegroundColor Green