Fixes: 1) Remove obsolete `reboot` scripts for Unix and Windows to prevent redundancy; 2) Update Windows `test.ps1` to handle omitted coverage patterns and improve error feedback. Extra: 1) Refactor Windows scripts (`make-messages.ps1`, `compile-messages.ps1`, `backup.ps1`) to use shared utilities for better consistency and output formatting; 2) Add spinner-based progress indicators to enhance user experience in interactive environments.
44 lines
1,018 B
PowerShell
44 lines
1,018 B
PowerShell
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
# Load shared utilities
|
|
$utilsPath = Join-Path $PSScriptRoot '..\lib\utils.ps1'
|
|
. $utilsPath
|
|
|
|
.\scripts\Windows\starter.ps1
|
|
if ($LASTEXITCODE -ne 0) {
|
|
exit $LASTEXITCODE
|
|
}
|
|
|
|
if (-not (Test-Path '.env'))
|
|
{
|
|
Write-Warning-Custom ".env file not found. Exiting without running Docker steps."
|
|
exit 0
|
|
}
|
|
|
|
# Check system requirements
|
|
if (-not (Test-SystemRequirements -MinCpu 4 -MinRamGB 6 -MinDiskGB 20))
|
|
{
|
|
exit 1
|
|
}
|
|
|
|
# Pull Docker images
|
|
Write-Step "Pulling images..."
|
|
docker compose pull
|
|
if ($LASTEXITCODE -ne 0) {
|
|
Write-Error-Custom "Failed to pull Docker images"
|
|
exit $LASTEXITCODE
|
|
}
|
|
Write-Success "Images pulled successfully"
|
|
|
|
# Build Docker images
|
|
Write-Step "Building images..."
|
|
docker compose build
|
|
if ($LASTEXITCODE -ne 0) {
|
|
Write-Error-Custom "Failed to build Docker images"
|
|
exit $LASTEXITCODE
|
|
}
|
|
Write-Success "Images built successfully"
|
|
|
|
Write-Result ""
|
|
Write-Result "You can now use run.ps1 script or run: lessy.py run"
|