Files
Workspace/Tools/AgentSupport/Benchmarks/Prepare-Baseline.ps1
T
cneicy 08246ddb01
Validate ShrinkSDK Workspace / catalog (push) Successful in 5s
Validate ShrinkSDK Workspace / unity (push) Successful in 3m20s
feat: integrate performance upgrade and agent inspection tooling
2026-09-29 10:16:02 +08:00

15 lines
862 B
PowerShell

$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 HEAD 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 "HEAD:$file") -join "`n"
[IO.File]::WriteAllText($target, $source.Replace('ShrinkContext', 'BaselineContext'), [Text.UTF8Encoding]::new($false))
}
git -C $module rev-parse HEAD | Set-Content -Encoding utf8 (Join-Path $destination 'revision.txt')