vcpkg/versions/c-/ctemplate.json

40 lines
1.0 KiB
JSON
Raw Normal View History

{
"versions": [
{
"git-tree": "491ab782407b38835b9a555dc77e6d3af485fdae",
"version-date": "2020-09-14",
"port-version": 2
},
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": "49845dc04f38d16b9c148162fc1457ed78608ae7",
"version-string": "2020-09-14",
"port-version": 1
},
{
"git-tree": "96aee13ec21957f5d9253a4e382f1896c312d7e8",
"version-string": "2020-09-14",
"port-version": 0
},
{
"git-tree": "c3864e4d9a627e75fb34b84351242574dad9c6df",
"version-string": "2017-06-23-44b7c5-4",
"port-version": 0
},
{
"git-tree": "a43674ee869a388a4e1dcab7a5fb727ad18de7a0",
"version-string": "2017-06-23-44b7c5-3",
"port-version": 0
},
{
"git-tree": "4d9b580f94963badba330f29c958021148bd1f31",
"version-string": "2017-06-23-44b7c5-2",
"port-version": 0
},
{
"git-tree": "8bca75088fb256f77df0783c8c0687ae5a3a0fe0",
"version-string": "2017-06-23-44b7c5b918a08ad561c63e9d28beecb40c10ebca",
"port-version": 0
}
]
}