vcpkg/versions/o-/osg-qt.json

45 lines
1.0 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": "743cc988a45a861fc3de537f6e8720a38a4cf90f",
"version-string": "Qt5",
"port-version": 2
},
{
"git-tree": "a02ebd7a6494e03f4a70553af4a525e1b7e17643",
"version-string": "Qt5",
"port-version": 1
},
{
"git-tree": "912b87e36bf6db14319d83e11d91286b6921675f",
"version-string": "Qt5",
"port-version": 0
},
{
"git-tree": "0cb876c38973571d755b0c92b17c8d1359027d07",
"version-string": "Qt4",
"port-version": 3
},
{
"git-tree": "fc3d2878ac7ceed72a6633d32221fd073df8a8a6",
"version-string": "Qt4-2",
"port-version": 0
},
{
"git-tree": "da9c70e3ae172bd798892b3a9e516fb19d24c55f",
"version-string": "Qt4-1",
"port-version": 0
},
{
"git-tree": "c6dcd175c5c17bdd9949db02d061e890e2e6ff6c",
"version-string": "Qt4",
"port-version": 0
},
{
"git-tree": "66529f574a94b3b934c9a0f8bbacc5107c32a8b7",
"version-string": "3.5.7",
"port-version": 0
}
]
}