vcpkg/versions/c-/ccd.json

50 lines
1.2 KiB
JSON
Raw Normal View History

{
"versions": [
{
"git-tree": "8e6fc55567d05873ba6f78c3c33363a0fd9a1549",
"version-string": "2.1-4",
"port-version": 3
},
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": "9a10df3929e80702a9e8c110612b1ecd8c32bee9",
"version-string": "2.1-4",
"port-version": 2
},
{
"git-tree": "a720cc123c190c6b68e57e356c4937685eeb2faa",
"version-string": "2.1-4",
"port-version": 1
},
{
"git-tree": "c5315a631ffcea9c2a158578e73c53d8455808de",
"version-string": "2.1-4",
"port-version": 0
},
{
"git-tree": "f50fc4c977c7ee43dbddf3d5b8c08694843f41a7",
"version-string": "2.1-3",
"port-version": 0
},
{
"git-tree": "7ecb86d672441a33985f400435082f119b3b1428",
"version-string": "2.1-1",
"port-version": 0
},
{
"git-tree": "c6bc0a25e0b963d679e5739c5e83bf31c0a9ff9a",
"version-string": "2.1",
"port-version": 0
},
{
"git-tree": "6cd15fcab18c56ab38f84446ad5d60b32bd102a1",
"version-string": "2.0.0-2",
"port-version": 0
},
{
"git-tree": "56bd676f18957cef95e0ffc9b454f3082c50360b",
"version-string": "2.0.0-1",
"port-version": 0
}
]
}