Make Eve artifact onboarding one command

This commit is contained in:
Meta Vens 2026-08-18 02:47:34 +02:00
commit d2a7693611
4 changed files with 33 additions and 12 deletions

View file

@ -1,5 +1,6 @@
param(
[string] $EveRoot = (Join-Path (Split-Path -Parent $PSScriptRoot) "..\Eve")
[string] $EveRoot = (Join-Path (Split-Path -Parent $PSScriptRoot) "..\Eve"),
[switch] $SkipDependencyInstall
)
$ErrorActionPreference = "Stop"
@ -53,6 +54,26 @@ foreach ($packageRoot in $packageRoots) {
}
}
if (-not $SkipDependencyInstall) {
$dependencyRoots = @($cultLibRoot, $eveContractsPackage, $eveBrowserPackage)
foreach ($dependencyRoot in $dependencyRoots) {
$typescript = Join-Path $dependencyRoot "node_modules\typescript\bin\tsc"
if (Test-Path -LiteralPath $typescript -PathType Leaf) {
continue
}
Push-Location $dependencyRoot
try {
& $npmPath ci --no-audit --no-fund
if ($LASTEXITCODE -ne 0) {
throw "Dependency installation failed: $dependencyRoot"
}
}
finally {
Pop-Location
}
}
}
$tempBase = [IO.Path]::GetFullPath([IO.Path]::GetTempPath())
$workRoot = Join-Path $tempBase ("gamecult-eve-two-runtime-" + [guid]::NewGuid().ToString("N"))
$artifactRoot = Join-Path $workRoot "artifacts"