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

70 lines
1.7 KiB
JSON

{
"versions": [
{
"git-tree": "73a19321158fe546f1469f290a83050fa6af14f1",
"version-string": "5.15.2",
"port-version": 1
},
{
"git-tree": "56d2cccdc3153966bbdd95194d45ee1c3a6afaae",
"version-string": "5.15.2",
"port-version": 0
},
{
"git-tree": "a8e21e36a43e286bbbd37238536e8fcf66c07ffa",
"version-string": "5.15.1",
"port-version": 0
},
{
"git-tree": "7d29e74a85bd0f7529d7d91ccde8e76f110f5818",
"version-string": "5.15.0",
"port-version": 0
},
{
"git-tree": "34ad67101305b735fd1bae1ea9f51834209e9a2a",
"version-string": "5.12.8",
"port-version": 0
},
{
"git-tree": "4bcf56e3b758c8262175ca277f6fd4b618421beb",
"version-string": "5.12.7",
"port-version": 0
},
{
"git-tree": "10829f8502c12f39b0719970e62fb3e2f7571de8",
"version-string": "5.12.5-2",
"port-version": 0
},
{
"git-tree": "5b5fb528b8ae358863a51553be5af453d9fbf312",
"version-string": "5.12.5-1",
"port-version": 0
},
{
"git-tree": "25f4b090864a4f9c19c2b5be0490541bb1c013e6",
"version-string": "5.12.5",
"port-version": 0
},
{
"git-tree": "8f6c5104ac50840812708b3c37073f7c9252d9cc",
"version-string": "5.12.4",
"port-version": 0
},
{
"git-tree": "73c22ac30c7de74d621b40169dba13bbaf67dfb0",
"version-string": "5.12.3-1",
"port-version": 0
},
{
"git-tree": "29532d7b36c0970267fba7c4818922af59a5fe8f",
"version-string": "5.12.3",
"port-version": 0
},
{
"git-tree": "102e281ccafd8b1c614b09f0b36aaeeda65e9d29",
"version-string": "5.12.1",
"port-version": 0
}
]
}