Files
Workspace/Tools/AgentSupport/Benchmarks/Prepare-Baseline.ps1
T
cneicy 0d9e04c09d
Validate ShrinkSDK Workspace / catalog (push) Successful in 4s
Validate ShrinkSDK Workspace / unity (push) Successful in 3m20s
chore(release): publish supplemental packages and remove internal reports
2026-09-29 10:42:21 +08:00

16 lines
949 B
PowerShell

param([string]$Revision = 'b93f3e61223e7572588b67c0d3935073817f0da6')
$ErrorActionPreference = 'Stop'
$root = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '../../..'))
$destination = Join-Path $root 'Artifacts/AgentSupport/BaselineContext'
New-Item -ItemType Directory -Force -Path $destination | Out-Null
$module = Join-Path $root 'Assets/Modules/ShrinkContext.Core'
$files = git -C $module ls-tree -r --name-only $Revision Runtime
foreach ($file in $files) {
if (-not $file.EndsWith('.cs')) { continue }
$target = Join-Path $destination $file
New-Item -ItemType Directory -Force -Path ([IO.Path]::GetDirectoryName($target)) | Out-Null
$source = (git -C $module show "${Revision}:$file") -join "`n"
[IO.File]::WriteAllText($target, $source.Replace('ShrinkContext', 'BaselineContext'), [Text.UTF8Encoding]::new($false))
}
git -C $module rev-parse $Revision | Set-Content -Encoding utf8 (Join-Path $destination 'revision.txt')