mirror of
https://github.com/github/spec-kit.git
synced 2026-08-15 14:02:04 +02:00
18 lines
731 B
PowerShell
18 lines
731 B
PowerShell
# update-context.ps1 — Generic integration: create/update context file
|
|||
|
|
#
|
||
|
|
# Thin wrapper that delegates to the shared update-agent-context script.
|
||
|
|
|
||
|
|
$ErrorActionPreference = 'Stop'
|
||
|
|
|
||
|
|
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||
|
|
$repoRoot = try { git rev-parse --show-toplevel 2>$null } catch { $null }
|
||
|
|
if (-not $repoRoot -or -not (Test-Path (Join-Path $repoRoot '.specify'))) {
|
||
|
|
$repoRoot = $scriptDir
|
||
|
|
$fsRoot = [System.IO.Path]::GetPathRoot($repoRoot)
|
||
|
|
while ($repoRoot -and $repoRoot -ne $fsRoot -and -not (Test-Path (Join-Path $repoRoot '.specify'))) {
|
||
|
|
$repoRoot = Split-Path -Parent $repoRoot
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
& "$repoRoot/.specify/scripts/powershell/update-agent-context.ps1" -AgentType generic
|