mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 23:49:09 +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 ```
130 lines
3.3 KiB
JSON
130 lines
3.3 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "cab54d6dedc48fcb9642f5fbe079e61105405543",
|
|
"version-string": "5.0.1",
|
|
"port-version": 5
|
|
},
|
|
{
|
|
"git-tree": "b0bd03f6677d06cc56fbcecb15ff205a9a43b66c",
|
|
"version-string": "5.0.1",
|
|
"port-version": 4
|
|
},
|
|
{
|
|
"git-tree": "d4228d8fc413efb47e151af707b6f1036c58b524",
|
|
"version-string": "5.0.1",
|
|
"port-version": 3
|
|
},
|
|
{
|
|
"git-tree": "835678d00f79a0633e787f2a9bcdf8569b50ce1a",
|
|
"version-string": "5.0.1",
|
|
"port-version": 2
|
|
},
|
|
{
|
|
"git-tree": "ae7164957f4d0939cd442331dd2a9bfe56430051",
|
|
"version-string": "5.0.1",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "1302729a9916e49763f596f27b8f7a078a3e295a",
|
|
"version-string": "5.0.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "f64ea36b5d8c21c60c59958df022037fe7ed3932",
|
|
"version-string": "5.0.0-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "c5c58bf13f6c7849d5f7f9d805334fc589848df1",
|
|
"version-string": "5.0.0-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "d05b368668ecb85ca0e8c3d7727d3639cc11f381",
|
|
"version-string": "5.0.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "bc39933b997e72876250e65cc0baf94a099394fc",
|
|
"version-string": "4.1.0-8",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "56f302b766f710e85906d5b008c2b4b784178038",
|
|
"version-string": "4.1.0-5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "bcd43128f09a1206a231cd5279bb9ec74d75715e",
|
|
"version-string": "4.1.0-4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a6f54c4aee8b9d96f9944df107bef204e33eeb22",
|
|
"version-string": "4.1.0-3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "ff167f3fc7d4c8177ab371520553be012c466276",
|
|
"version-string": "4.1.0-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "435f1e736588b3d29f64e8198d58506115db39ab",
|
|
"version-string": "4.1.0-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "14923a9e7e72c854f259313474be015fc3d67efb",
|
|
"version-string": "4.1.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "6e0021228c36fd58b2b0648d82d8638404f38004",
|
|
"version-string": "4.0.1-3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "880c6f28522040ec88f7bbff8b46996db50d12e1",
|
|
"version-string": "4.0.1-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "7feb4e6445d69845d3749b8c46a8aadc9a7b43c7",
|
|
"version-string": "4.0.1-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "2f1952a8ef4f38ae627e8c39c44eb41668f00d5a",
|
|
"version-string": "4.0.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "dc206c1ce726af6f25ff75bd1c4590c190601263",
|
|
"version-string": "4.0.0-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "d3973ad124bd172e9621c53896da2cfa69891101",
|
|
"version-string": "4.0.0-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a97b97ef3c6754dbda9d02b7ff41c11a84b260f4",
|
|
"version-string": "4.0.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "620a3ea9e55329625a48a01a58cd9217c11e5621",
|
|
"version-string": "3.3.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4fc82cfbc7d8285e54202eddcffb67757a5d0f48",
|
|
"version-string": "3.2.1",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|