mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 20:23:41 +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 ```
110 lines
2.9 KiB
JSON
110 lines
2.9 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "5126bae583b1f4d7d512b4bc06d799da0cd664be",
|
|
"version-string": "2020-09-14",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "c7f12f98aceb87089db977ee201850fef601bc64",
|
|
"version-string": "2020-09-14",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "31a907864df76e8932f426716a80ff724b54105a",
|
|
"version-string": "2019-07-11",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4720065ce96f98f710dcbacab77132b91fca2e4f",
|
|
"version-string": "2019-04-19",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "04f55544280b5c863e4d7be28cc897513d881040",
|
|
"version-string": "2019-03-29",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "35c254963e255eadbdb7fb7f56e4d5800ed8a42f",
|
|
"version-string": "2019-01-30",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "5911bd529b3fcf0b111c0f0295f858ea158cd06b",
|
|
"version-string": "2019-01-09",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "2722a4a810ff8a728e33a012d75f89dd0e1e4fa0",
|
|
"version-string": "2018-12-14",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "cc4ae6b44e08595fd9f6435de8b7477042da87b6",
|
|
"version-string": "2018-10-25",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "8edb59c4ad41d0589025ad5361eceb0b0ccd489b",
|
|
"version-string": "2018-10-11",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a4bf9d56075e78b77a63e240bdde4532a3c11384",
|
|
"version-string": "2018-09-18",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "cba285e2d625219dfb27417fd6bae6f800cf9361",
|
|
"version-string": "2018-08-03",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "99d2393d278d2d7dbf30afc201d7402c77e9b41a",
|
|
"version-string": "2018-07-30",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "197deb6b4b77ca75ff0a5559706521e70c6e1070",
|
|
"version-string": "2018-07-08",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a8e3ebf866df1a75abe50e258c718db619c13fdb",
|
|
"version-string": "2018-05-17",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "2cc04604e40dbf7ba45931b94270a4f691e4067b",
|
|
"version-string": "2018-04-25",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "c0b2c5feb3edaecca5d4e40483cdd0382b2c127c",
|
|
"version-string": "2018-03-20",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "978314718a46c525617e4eeb603ebc96980dc9ce",
|
|
"version-string": "2018-03-13",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "613750b60244da7e9d82ca52c5be5f3913f1fb4f",
|
|
"version-string": "2018-02-25",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "cd4f8b1da7af37253ccb7b0e734daeac6a2671cf",
|
|
"version-string": "2017-12-06-bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "00b865d068d2c07d961d79091f616c21def5c7a6",
|
|
"version-string": "2017-12-06-bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|