This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
EveUnity/scripts/pack.ps1

27 lines
746 B
PowerShell
Raw Normal View History

2026-07-10 02:27:47 +01:00
param(
[string] $OutputRoot = "artifacts\packages"
)
$ErrorActionPreference = "Stop"
$repoRoot = Split-Path -Parent $PSScriptRoot
$packageRoot = Join-Path $repoRoot "packages\org.gamecult.eve.unity-scene"
$output = if ([System.IO.Path]::IsPathRooted($OutputRoot)) {
$OutputRoot
} else {
Join-Path $repoRoot $OutputRoot
}
New-Item -ItemType Directory -Force -Path $output | Out-Null
$packed = npm pack $packageRoot --pack-destination $output
if ($LASTEXITCODE -ne 0) {
throw "EveUnity UPM package failed to pack"
}
$artifact = Join-Path $output ($packed | Select-Object -Last 1)
if (-not (Test-Path -LiteralPath $artifact)) {
throw "EveUnity package artifact was not produced: $artifact"
}
Write-Host "EveUnity package: $artifact"