vcpkg/versions/q-/qt5-gamepad.json
Billy O'Neal b295670e4b
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 01:24:04 -07:00

95 lines
2.4 KiB
JSON

{
"versions": [
{
"git-tree": "d74a2774e03103111a4e73c990eb65e78416e784",
"version-string": "5.15.2",
"port-version": 1
},
{
"git-tree": "c59f1d686877d4dc3944d5b1f6c9544b9e3fc3a5",
"version-string": "5.15.2",
"port-version": 0
},
{
"git-tree": "95329903ce4d3b26934d0503c9707d5fe3958b7e",
"version-string": "5.15.1",
"port-version": 0
},
{
"git-tree": "7748c2540ff01eb175e413dae494875e195dbb60",
"version-string": "5.15.0",
"port-version": 0
},
{
"git-tree": "24c8431871aa674ce21b347657934ce02d6580ac",
"version-string": "5.12.8",
"port-version": 0
},
{
"git-tree": "c34c74f8774a3855dcd89302de33476b0c1d3bd8",
"version-string": "5.12.7",
"port-version": 0
},
{
"git-tree": "fef77ad74f66c9702918f6a3c055e76cca731996",
"version-string": "5.12.5-2",
"port-version": 0
},
{
"git-tree": "defb8f7b65a21eee3d880ebd278501bc58c4bf45",
"version-string": "5.12.5-1",
"port-version": 0
},
{
"git-tree": "a6fa45451a9182978fbd96871ec87aeb7ad2074d",
"version-string": "5.12.5",
"port-version": 0
},
{
"git-tree": "678bddee43408b62b991b77fe69b04fbaea15a43",
"version-string": "5.12.4",
"port-version": 0
},
{
"git-tree": "5c342669d91c2e20107a1173b7fffe3346bc53b5",
"version-string": "5.12.3-2",
"port-version": 0
},
{
"git-tree": "d6d2287754674d446b7256f6f9336448a1e4df5d",
"version-string": "5.12.3-1",
"port-version": 0
},
{
"git-tree": "2e2c603c1d2b51dbefac179e9ddb94a641fb91b4",
"version-string": "5.12.3",
"port-version": 0
},
{
"git-tree": "3c4b085ce989278731249adf39e1ea4cab3d9e3a",
"version-string": "5.12.1",
"port-version": 0
},
{
"git-tree": "0663b9960c527d360ff02356a48f7143384a6272",
"version-string": "5.12.0",
"port-version": 0
},
{
"git-tree": "2695bb7fee2f5bd797282db9699288ea0fdc36a6",
"version-string": "5.11.2",
"port-version": 0
},
{
"git-tree": "6fe38d30464018021eaa6dfe484593b42082bc49",
"version-string": "5.11.1",
"port-version": 0
},
{
"git-tree": "4e418379bad1cbdd9802dd3e697d4f9ac69f6218",
"version-string": "5.9.2-0",
"port-version": 0
}
]
}