Files
SEQUA-Engine/scripts/check.ps1
T
Ange-Marie MAURIN - A2M Systèmes e231e643cd refactor(studio): l'interface passe dans studio/ui, studio/ devient l'ensemble host + ui
Studio regroupe l'exécutable hôte (C++, à venir dans studio/host) et l'interface web (TypeScript, studio/ui). Chemins mis à jour dans les scripts, .gitignore et la documentation ; paquet renommé @sequa/studio-ui.
2026-11-06 22:24:27 +01:00

61 lines
1.5 KiB
PowerShell

# SPDX-License-Identifier: MPL-2.0
#
# Verification locale complete avant commit (remplace la CI) :
# tous les presets Windows, puis Studio s'il existe.
# Messages en ASCII : compatible Windows PowerShell 5.1 sans BOM.
#
# .\scripts\check.ps1
# .\scripts\check.ps1 -SkipStudio
<#
.SYNOPSIS
Verification locale complete avant commit (remplace la CI).
.DESCRIPTION
Construit et teste les presets windows-msvc-debug, -release et -asan, puis lance
npm ci et npm run check dans studio/.
.PARAMETER SkipStudio
Ne verifie pas Studio.
.PARAMETER Help
Affiche cette aide.
#>
[CmdletBinding()]
param(
[switch]$SkipStudio,
[Alias("h", "?")]
[switch]$Help
)
if ($Help) {
Get-Help $PSCommandPath -Detailed
exit 0
}
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $PSScriptRoot
foreach ($preset in "windows-msvc-debug", "windows-msvc-release", "windows-msvc-asan") {
& (Join-Path $PSScriptRoot "build.ps1") -Preset $preset
}
$studio = Join-Path $root "studio\ui"
if (-not $SkipStudio -and (Test-Path (Join-Path $studio "package.json"))) {
Push-Location $studio
try {
Write-Host "==> studio : npm ci" -ForegroundColor Cyan
npm ci
if ($LASTEXITCODE -ne 0) { throw "Echec : npm ci" }
Write-Host "==> studio : npm run check" -ForegroundColor Cyan
npm run check
if ($LASTEXITCODE -ne 0) { throw "Echec : npm run check" }
}
finally {
Pop-Location
}
}
Write-Host "Verification locale OK" -ForegroundColor Green