vcpkg/versions/x-
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
..
x264.json [x264] Fix build failed on uwp (#15769) 2021-01-26 14:55:06 -08:00
x265.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
x-plane.json [vcpkg] Rename port_versions to versions (#15784) 2021-01-21 09:53:22 -08:00
xalan-c.json [Xalan-C] update to 1.12 (#17256) 2021-04-29 16:18:49 -07:00
xaudio2redist.json [xaudio2redist] Add new port (#17174) 2021-04-15 13:20:18 -07:00
xbyak.json [vcpkg] Rename port_versions to versions (#15784) 2021-01-21 09:53:22 -08:00
xerces-c.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
xeus.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
xframe.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
xlnt.json [macos ci] update 2021-07-27 (#19207) 2021-08-04 13:27:40 -07:00
xlsxio.json [xlsxio] new port (#18438) 2021-07-06 14:04:12 -07:00
xmlsec.json [xmlsec]Update to 1.2.32 (#18199) 2021-06-03 12:42:49 -07:00
xmsh.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
xnnpack.json [xnnpack] create a new port (#17064) 2021-05-17 23:22:24 -07:00
xorstr.json [vcpkg] Rename port_versions to versions (#15784) 2021-01-21 09:53:22 -08:00
xproperty.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
xsimd.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
xtensor-blas.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
xtensor-fftw.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
xtensor-io.json [glew/openvdb/xtensor-io] Update to latest release version (#20022) 2021-09-08 07:56:56 -07:00
xtensor.json [xtensor] update to 0.23.9 (#18206) 2021-06-10 16:02:29 -07:00
xtl.json [xtensor] update to 0.23.9 (#18206) 2021-06-10 16:02:29 -07:00
xxhash.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00