Update Version Baseline
Register one or more ports into the registry versions/ tracking (modifies versions/baseline.json and versions/<letter>-/<port>.json files) using the helper script ./scripts/registry-add-version.ps1. Falls back to inferring ports from recent context when explicit names are not provided.
Goals
- PASS: Version baseline updated consistently for target ports;
versions/JSON files validated. - FAIL: Baseline update incomplete or invalid; errors reported with actionable fixes.
Capabilities
- Accept port names (single or multiple) or infer from session context
- Validate ports exist in
ports/folder - Run
registry-add-version.ps1for each port - Capture and summarize script output
- Suggest commit commands for baseline/version changes (only commit when explicitly requested)
User Input
Supported Patterns:
- Single port name:
openssl3 - Multiple ports:
onnx onnx-optimizer onnxruntime - Natural language:
update baseline for ruy and cpuinfo - Empty input: infer from session chat or latest 3 git commit logs
Process
Phase 1: Determine Target Ports
- Parse explicit input — use names directly if provided
- Infer from context or git logs if no names given:
- Look for filenames like
ports/<name>/... - Look for mentions like
upgrade <name>
- Look for filenames like
- Validate existence: check
ports/{name}/vcpkg.jsonexists - Format the port files:
./scripts/registry-format.ps1 -VcpkgRoot "$env:VCPKG_ROOT" -RegistryRoot "$(Get-Location)"
Phase 2: Execute Registry Add-Version
- If files in ports folder changed, recommend committing:
# Suggest to user: git add ./ports/port-name/ git commit -m "[port-name] commit formatting changes" - Run script per port:
$RegistryRoot = (Get-Location).Path $VcpkgRoot = $env:VCPKG_ROOT foreach ($p in $Ports) { ./scripts/registry-add-version.ps1 -PortName $p -VcpkgRoot $VcpkgRoot -RegistryRoot $RegistryRoot } - Capture output and check for errors
Phase 3: Results & Recommendations
- Summarize changes — list updated files under
versions/ - Recommend commit for versions folder changes (only if user requests):
# Suggest to user: git add ./versions git commit -m "[<port-name>] update baseline"
Error Handling
- Missing
vcpkgor CLI tool error: suggest runningcheck-environmentskill - Port unknown: suggest checking name or creating the port
- Script failure: show terminal output and diagnose messages
Reporting
Output a markdown report with these headings (in order). Emit all headings even if empty (use None).
# Update Version Baseline Report## Summary— Timestamp, ports requested, ports processed, outcome (READY/WARN/ERROR)## Ports— Valid (found inports/), Invalid (missing or unresolved)## Changes— Updated files:versions/<letter>-/<port>.json,versions/baseline.json## Errors— List of failures with brief context## Recommendations— Actionable suggestions## Next Steps— Open PR, link to upstream release notes
Source: luncliff/vcpkg-registry — distributed by TomeVault.