mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 11:31:38 +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": "7fb1b17892d53638ec4ada0a73b19ecef4062ec8",
|
|
"version-string": "5.15.2",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "94f99955ff8d1ce62723d2af72d47a138aabb5d0",
|
|
"version-string": "5.15.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "bbb37ca5fe38a40c2d36790d54469ce0572428f7",
|
|
"version-string": "5.15.1",
|
|
"port-version": 2
|
|
},
|
|
{
|
|
"git-tree": "0d55afe17af07acb0efc6fadd414cdcb24b39ff5",
|
|
"version-string": "5.15.1",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "137077a310c09ae74997b02638521b44b903bd5a",
|
|
"version-string": "5.15.0",
|
|
"port-version": 2
|
|
},
|
|
{
|
|
"git-tree": "653e5b985c529465b92e802d1e0cd3fd850e2dbb",
|
|
"version-string": "5.15.0",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "e8adac38b16922490313ee9b8b339c9d37d044a0",
|
|
"version-string": "5.15.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "b8536d7c95724375fde00fc67d8ff801f423e198",
|
|
"version-string": "5.12.8",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "3a20ac86c3d2c811dcb72af128326416d5da7d59",
|
|
"version-string": "5.12.7",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a2cd6e5e63d8ca04117d103da9d8d33d8ef53352",
|
|
"version-string": "5.12.5-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "57e1682ef36b05dc45b480751f09b35b3c9664ef",
|
|
"version-string": "5.12.5-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "addb2df8d2eefeadcbe9f8be76f7c367484118a1",
|
|
"version-string": "5.12.5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4524d45ce884fc4cd5c98527e350c062ea4645aa",
|
|
"version-string": "5.12.4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "3fde0090fa6aa49edfc42e14f226cf656d8454e8",
|
|
"version-string": "5.12.3-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "0285d5bfafea94ee25776f00aaa65a610b26d1d2",
|
|
"version-string": "5.12.3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4b82275e555fbcebbb96a5ce93654aa31d8919e6",
|
|
"version-string": "5.12.1",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|