vcpkg/versions/u-
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
..
uchardet.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
umock-c.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
unicorn-lib.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
unicorn.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
units.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
unittest-cpp.json [unittest-cpp] fix config.cmake file (#17122) 2021-06-10 11:48:54 -07:00
unixodbc.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
unqlite.json [vcpkg] Rename port_versions to versions (#15784) 2021-01-21 09:53:22 -08:00
unrar.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
upb.json Update VMs, CMake to 3.20.1, CUDA to 11.3, and pwsh to 7.1.3 (#17331) 2021-04-26 10:27:45 -07:00
urdfdom-headers.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
urdfdom.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
urho3d.json [urho3d] Add features, fix usage (#18975) 2021-07-22 14:52:17 -07:00
uriparser.json [uriparser] Update to v0.9.5 (#19820) 2021-09-07 21:04:44 -07:00
usbmuxd.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
usd.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
usockets.json [uSockets] update to version 0.7.1 (#16697) 2021-03-15 11:01:01 -07:00
usrsctp.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
utf8h.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
utf8proc.json [utf8proc] Export cmake targets (#18860) 2021-07-08 10:50:43 -07:00
utfcpp.json [utfcpp] Update to 3.2.1 version (#18299) 2021-06-11 08:59:54 -07:00
utfz.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
uthenticode.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
uvatlas.json [uvatlas, spectra] ports updated (#18404) 2021-06-21 14:20:45 -07:00
uvw.json Bulk convert control files. (#19986) 2021-09-09 01:24:04 -07:00
uwebsockets.json [fftw3/libwebsockets/uwebsockets] Update to latest release (#20051) 2021-09-08 08:02:56 -07:00