Doc manifest schema process#6280
Conversation
This comment has been minimized.
This comment has been minimized.
florelis
left a comment
There was a problem hiding this comment.
I didn't read the script that closely, but it looks enough like it's good
|
|
||
| ## Helper script | ||
|
|
||
| `Branch-LatestManifestSchema.ps1` (in this directory) automates most of both workflows below. |
There was a problem hiding this comment.
Nit: Branch is not an approved PS verb. If not using an approved verb
| the in-flight schema needs to be locked in. | ||
|
|
||
| With -BumpVersion: | ||
| Reads the target version from src/binver/binver/version.h (MAJOR.MINOR.0) and compares |
There was a problem hiding this comment.
Could we have this script also update version.h?
There was a problem hiding this comment.
That feels like a part of a larger operation. We could certainly collect a bunch of things, including this, into a "Move the version forward" process.
| `ManifestSchemaValidation.cpp`, converting the old top block to an `else if`. | ||
| 10. Adds a new version constant to `ManifestVersion.cs`. | ||
|
|
||
| **Manual steps always required (not automated):** |
There was a problem hiding this comment.
Dropped them as it is actually part of modifying the latest schema, not preparing to do so.
| param([string]$Content, [string]$Path) | ||
| [System.IO.File]::WriteAllText($Path, $Content, (New-Object System.Text.UTF8Encoding $false)) |
| $vcxitemsFile = Join-Path $manifestSchemaDir 'ManifestSchema.vcxitems' | ||
| $filtersFile = Join-Path $manifestSchemaDir 'ManifestSchema.vcxitems.filters' | ||
| $manifestCommonH = Join-Path $RepoRoot 'src\AppInstallerCommonCore\Public\winget\ManifestCommon.h' | ||
| $schemaValidationCpp = Join-Path $RepoRoot 'src\AppInstallerCommonCore\Manifest\ManifestSchemaValidation.cpp' |
There was a problem hiding this comment.
Pull request overview
This PR documents the WinGet manifest JSON schema versioning/branching process and introduces a PowerShell helper script to automate freezing latest/ schemas into versioned snapshots and (optionally) bumping latest/ to match the binary version.
Changes:
- Added
schemas/JSON/manifests/README.mddescribing schema directory layout and the two versioning workflows. - Added
Branch-LatestManifestSchema.ps1to automate schema branching and source-file updates during version bumps. - Added a path-scoped Copilot instructions file for manifest schema versioning guidance.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| schemas/JSON/manifests/README.md | Documents schema folder structure, versioning workflows, and required manual steps. |
| schemas/JSON/manifests/Branch-LatestManifestSchema.ps1 | Adds automation for branching latest/ into vX.Y.0/ and optionally bumping schema/version references across source files. |
| .github/instructions/manifest-schema-versioning.instructions.md | Adds path-scoped contributor/agent guidance for the manifest schema versioning process. |
📖 Description
Includes some human and 🤖 notes for updating the manifest schema files, as well as a script that does most/all of it for you.
🔍 Validation
Tested the script output locally.
Microsoft Reviewers: Open in CodeFlow