mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 22:39: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": "75e1a170720117fcc34369aae8ab7ee4816974a3",
|
|
"version-string": "5.15.2",
|
|
"port-version": 2
|
|
},
|
|
{
|
|
"git-tree": "84778600522df34a9db6d62f0c217c5d29346492",
|
|
"version-string": "5.15.2",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "4cdec015d18a0bf66a77ea27006346f0fe382c64",
|
|
"version-string": "5.15.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "e8e8fc61228f3069fcef1a81eb448c955bce11ee",
|
|
"version-string": "5.15.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "e67485b147021f0ceda43cad61dc1e6e92ccf3cc",
|
|
"version-string": "5.15.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "f83a2d62509852229f61a6a480ac2a026e80ca04",
|
|
"version-string": "5.12.8",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "6c9aaaa31eb626633476beb087863cbc1fe04157",
|
|
"version-string": "5.12.7",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "bfc97b284f2c20489027d289ee249de8e900a7fc",
|
|
"version-string": "5.12.5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4edc438357050e3e5e84eeeb7bd64339ad23554d",
|
|
"version-string": "5.12.4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "951e7da001ff8d894bc6d6755d6dd9f7c0738166",
|
|
"version-string": "5.12.3-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "ff1a00f52b9aca17b9e060f4e3e680fbfce6f740",
|
|
"version-string": "5.12.3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "1be67d82d26748d434d76388eff9502cb0e982d0",
|
|
"version-string": "5.12.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "1f0e7210df520062f75c7091422a01b7d203b4ff",
|
|
"version-string": "5.12.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "5dc0d79f817b9e12df792c45345538b6a880c6d7",
|
|
"version-string": "5.11.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "e09a9499f71933eed22c84bdc630bed3e353883a",
|
|
"version-string": "5.11.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "9e8431ea75da30642de515fa85a2f3471833cd36",
|
|
"version-string": "5.9.2-0",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|