vcpkg/versions/q-/qt5-winextras.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

85 lines
2.1 KiB
JSON

{
"versions": [
{
"git-tree": "85a345a5fdc5a15584e6b2add00f1669e4099dbc",
"version-string": "5.15.2",
"port-version": 1
},
{
"git-tree": "74a7ae6df8a4a7074f5defa9b74ec25140f91c6b",
"version-string": "5.15.2",
"port-version": 0
},
{
"git-tree": "382a4b48cd76feb4c9fc84cfee66f2aa5589ecc7",
"version-string": "5.15.1",
"port-version": 0
},
{
"git-tree": "9eee10e08d30f083b58f086e045e68a5f6f56716",
"version-string": "5.15.0",
"port-version": 0
},
{
"git-tree": "6ead1ad0349a17b19af0cb89ce1f6c2225706870",
"version-string": "5.12.8",
"port-version": 0
},
{
"git-tree": "eea49a6918113a3b68b14042ddffe9a9fd876616",
"version-string": "5.12.7",
"port-version": 0
},
{
"git-tree": "1cf1011d345da4b62a3940c448dc5b5d7d4a8d05",
"version-string": "5.12.5-1",
"port-version": 0
},
{
"git-tree": "598332a52e89eea8f21f872dff068fb85823fa21",
"version-string": "5.12.5",
"port-version": 0
},
{
"git-tree": "b532def8243f6784f888dfa2fc40342355699cfb",
"version-string": "5.12.4",
"port-version": 0
},
{
"git-tree": "e1d99ed0e8610f124869eb99ccb8b4ea43f5f652",
"version-string": "5.12.3-1",
"port-version": 0
},
{
"git-tree": "57864bbe071e50ffd9d0d0c2524a444f2c38b2ca",
"version-string": "5.12.3",
"port-version": 0
},
{
"git-tree": "3d1caef57ca3a62830cd66faed4d99291e015223",
"version-string": "5.12.1",
"port-version": 0
},
{
"git-tree": "768451de1d8a9d6fe6040ff66ca7d8a77cdcba9f",
"version-string": "5.12.0",
"port-version": 0
},
{
"git-tree": "4168465ea0f28742c2b6eddef361b0730efe6e43",
"version-string": "5.11.2",
"port-version": 0
},
{
"git-tree": "1681fdc4e2fb7d7d009079b82f4989e26cf4aa1b",
"version-string": "5.11.1",
"port-version": 0
},
{
"git-tree": "f5a940630183d0f5b478cf829a12f403e0de4506",
"version-string": "5.9.2-0",
"port-version": 0
}
]
}