mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 08:19:01 +08:00
b295670e4b
``` function Convert-Control { Param($full) .\vcpkg.exe format-manifest $full $root = $full.Substring(0, $full.Length - 7) # CONTROL $new = $root + 'vcpkg.json' $content = Get-Content -Raw $new $asJson = ConvertFrom-Json $content -AsHashtable -Depth 100 $oldVersion = $asJson['port-version'] if ($null -eq $oldVersion) { $oldVersionFull = $asJson['version-string'] Write-Host "Got version $oldVersionFull" $match = [System.Text.RegularExpressions.Regex]::Match($oldVersionFull, '^(.+)-(\d+)$') if ($match.Success -and -not [System.Text.RegularExpressions.Regex]::IsMatch($oldVersionFull, '^\d\d\d\d-\d\d-\d\d$')) { $newFullVersion = [string]$match.Groups[1].Value $oldVersion = [int]$match.Groups[2].Value Write-Host "newFullVersion $newFullVersion oldVersion $oldVersion" $newVersion = $oldVersion + 1 $asJson['version-string'] = $newFullVersion Write-Host "Previous version for $full extracted from version field -- setting version-string $newFullVersion and port-version $newVersion" } else { Write-Host "No previous version for $full -- setting 1" $newVersion = 1 } } else { $newVersion = [int]$oldVersion + 1 Write-Host "New version for $full : $newVersion" } $asJson['port-version'] = $newVersion $content = ConvertTo-Json $asJson -Depth 100 Set-Content -Path $new -Value $content .\vcpkg.exe format-manifest $new } Get-ChildItem ports\CONTROL -Recurse | Foreach-Object { Convert-Control $_.FullName } git commit -am "this message" .\vcpkg.exe x-add-version -all git commit -a --amend ```
85 lines
2.1 KiB
JSON
85 lines
2.1 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "8a675679d46b85666ef053efb36a2bb70b40b8ee",
|
|
"version-string": "5.15.2",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "a85ea3d22e31e21a063a9a9f1c88c53e8fe85a13",
|
|
"version-string": "5.15.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "9675a4b9bf484787826270cc1a6505d78efb4ba8",
|
|
"version-string": "5.15.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "10dc0760f788939675716ef5ed7c0951cfdcaa55",
|
|
"version-string": "5.15.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "c0271ed9ee32873c7380da8595dabac07f4aa10f",
|
|
"version-string": "5.12.8",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "5ca105e3da8925266809ae7eadd44d2d05d78109",
|
|
"version-string": "5.12.7",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a9c235a67c50da1088c0e6bb31c588bd19dadd5b",
|
|
"version-string": "5.12.5-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "f7c9d40286086feb6518e976009f60524cc1804c",
|
|
"version-string": "5.12.5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "2153cca32a6cfe70fddbd129d02d0825447a2a59",
|
|
"version-string": "5.12.4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "5af21e1ed292108c7ccdc9c1b68e6d1fa37ef690",
|
|
"version-string": "5.12.3-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "ba43527171aaaa0df845f383b3605fcb5f5ce5aa",
|
|
"version-string": "5.12.3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "b1d3ab97c9a44294da3495b3905addde388ab1fa",
|
|
"version-string": "5.12.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "b7fc0bff6e213faea478e6e3841990f01361153a",
|
|
"version-string": "5.12.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "fc361535d247a2580800441e0e77eb36ff824979",
|
|
"version-string": "5.11.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "efc93672b05e4c9805d85b837a445ed4bea609a7",
|
|
"version-string": "5.11.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a1a26c1e7f98214e79dca86de692e48d71555c90",
|
|
"version-string": "5.9.2-0",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|