vcpkg/versions/p-/parson.json

60 lines
1.5 KiB
JSON
Raw Normal View History

{
"versions": [
Bulk convert control files. (#19986) ``` 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 ```
2021-09-09 16:24:04 +08:00
{
"git-tree": "40671b05e30f32cdc83003036e882ed4b1f7b44d",
"version-string": "2020-09-14",
"port-version": 1
},
{
"git-tree": "33cc29e8ca91bd2f207c5c352345ce242251d9cb",
"version-string": "2020-09-14",
"port-version": 0
},
{
"git-tree": "60378e28a0e8e71f2036876340f6aeaa7a2bd755",
"version-string": "2019-07-11",
"port-version": 0
},
{
"git-tree": "d39981054811de128b20a9285f9ef5cbe72270eb",
"version-string": "2019-04-19",
"port-version": 0
},
{
"git-tree": "a1413d36f39161c94236ef8fbcf4758d567953d6",
"version-string": "2019-03-29",
"port-version": 0
},
{
"git-tree": "7dba904ce71df66c5f256a0756a8e5e912f94b0c",
"version-string": "2018-12-14",
"port-version": 0
},
{
"git-tree": "8750917b914a687ac5dc81472b2416c6147810c2",
"version-string": "2018-09-18",
"port-version": 0
},
{
"git-tree": "f894640f4e7e1fd57f95fb296e701cd63d28b530",
"version-string": "2018-08-03",
"port-version": 0
},
{
"git-tree": "2c8bdd8568b0f4f6371d537750b9399c1a5b2086",
"version-string": "2018-05-17",
"port-version": 0
},
{
"git-tree": "27152c8ea7d3eeb3227a6b863f33e543083e70a3",
"version-string": "2018-04-17",
"port-version": 0
},
{
"git-tree": "0d1d17c5dad5c93db253e31572f49a9ba90cc88f",
"version-string": "2018-03-23",
"port-version": 0
}
]
}