一键导入
update-port
Update an existing port to a newer upstream version with SHA512 calculation and testing. Use when asked to update, upgrade, or bump a port version.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Update an existing port to a newer upstream version with SHA512 calculation and testing. Use when asked to update, upgrade, or bump a port version.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Detect OS/shell, validate vcpkg setup, and emit a combined environment report. Use when asked to check the environment, verify setup, or troubleshoot vcpkg configuration.
Check for upstream project updates and newer versions. Use when asked to check for updates, compare versions, or see if a port is outdated.
Create a new vcpkg port with portfile.cmake, vcpkg.json, and patches. Use when asked to create, add, or generate a new port for a project.
Install a vcpkg port with overlay-ports and analyze build logs. Use when asked to install, test, or build a port.
Review port files against vcpkg guidelines and best practices. Use when asked to review, validate, or check a port for correctness.
Search for existing vcpkg ports by name, GitHub URL, or keywords in the local registry and upstream microsoft/vcpkg repository. Use when asked to find, search, or check if a port exists.
| name | update-port |
| description | Update an existing port to a newer upstream version with SHA512 calculation and testing. Use when asked to update, upgrade, or bump a port version. |
Update an existing port to a newer upstream version by modifying vcpkg.json and portfile.cmake, calculating new SHA512, and testing with --editable flag.
--editable flagSupported Patterns:
openssl3 3.0.15, update cpuinfo to 2024-01-15update tensorflow-lite (fetch latest from upstream)update openssl3 from https://github.com/openssl/openssl/releases/tag/openssl-3.0.15ports/{port-name}/vcpkg.json — extract current version, homepageports/{port-name}/portfile.cmake — extract REPO, REF, SHA512, HEAD_REFcheck-port-upstream logic)https://github.com/{owner}/{repo}/archive/refs/tags/{tag}.tar.gzv${VERSION} for projects using v1.2.3 tagsopenssl-${VERSION} for OpenSSL-style${VERSION} for simple tagscurl -L -o "temp-${Version}.tar.gz" $Urlcurl -L -o "temp-${version}.tar.gz" "$url"(Get-FileHash -Algorithm SHA512 "temp-${Version}.tar.gz").Hash.ToLower()sha512sum "temp-${version}.tar.gz" | awk '{print $1}'0 as placeholder if download fails (vcpkg reports correct SHA512 on first attempt)vcpkg.json: change "version" field to new versionportfile.cmake:
REF (if hardcoded; skip if using ${VERSION} variable)SHA512 to new valuevcpkg install --editable `
--overlay-ports ./ports `
--x-buildtrees-root buildtrees `
--x-packages-root packages `
--x-install-root installed `
{port-name}
vcpkg.json — verify version correctportfile.cmake — verify SHA512 and REF correct./scripts/registry-format.ps1 -VcpkgRoot "$env:VCPKG_ROOT" -RegistryRoot "$(Get-Location)"
Output a markdown report with these headings (in order). Emit all headings even if empty (use None).
# Port Upgrade Report## Summary — Port, old/new version, timestamp, outcome (SUCCESS/FAILURE/SHA512 CORRECTED), mode## Version Changes — vcpkg.json change, REF strategy, major/minor classification## Source & SHA512 — Source URL, new SHA512, acquisition method, placeholder/correction## File Modifications — Changed lines in vcpkg.json and portfile.cmake## Test Installation — Command, result, duration, artifacts, log path (if failed)## Validation — Version field, SHA512, REF pattern, editable test, baseline update needed## Issues & Warnings — Critical issues and warnings with fix actions## Next Steps — Based on outcome: commit → registry-add-version → commit versions./scripts/registry-add-version.ps1 → recommend commit versions → open PR