vcpkg/versions/o-/openmpi.json

45 lines
1.0 KiB
JSON
Raw Normal View History

{
"versions": [
{
"git-tree": "5d701c1350d6cb8e4380f829460e8287b0e2f6cc",
"version": "4.1.0",
"port-version": 3
},
{
"git-tree": "2c4b5b526fe4b6a8de9fa88eea30d3a1ddc7878e",
"version-string": "4.1.0",
"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": "bcc3284d0c3730ee4237efff0cd32df0be272d8e",
"version-string": "4.1.0",
"port-version": 1
},
{
"git-tree": "ada9b58df7928b49218b4b932e37b343a2047273",
"version-string": "4.1.0",
"port-version": 0
},
{
"git-tree": "54178d2df9f03298fa293753786c0ddbb1fbf2c4",
"version-string": "4.0.3",
"port-version": 3
},
{
"git-tree": "249a4fc77010f09a504f596c0e811bc3850de534",
"version-string": "4.0.3",
"port-version": 2
},
{
"git-tree": "06b1d72b704fb774c6a0b9a3143f8b82b426e3f0",
"version-string": "4.0.3",
"port-version": 0
},
{
"git-tree": "02332e549c9366cd4f861e3d7493bdc2903a47f1",
"version-string": "4.0.1",
"port-version": 0
}
]
}