vcpkg/versions/l-/libevent.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": "16a3ac34416a0b208f97f9a0afdeecdcc60699e1",
"version-string": "2.1.12",
"port-version": 2
},
{
"git-tree": "27a15ae417cdf4fd4388ab02d2949632699ce004",
"version-string": "2.1.12",
"port-version": 1
},
{
"git-tree": "de4ba2c173271d60e7022b3bd69440255cd0addd",
"version-string": "2.1.12",
"port-version": 0
},
{
"git-tree": "464499eb500390a56ac7e7b3cb6d2098ab254571",
"version-string": "2.1.11-5",
"port-version": 0
},
{
"git-tree": "f6b41d55f20103863facc8c14fe10072dfc9cfe9",
"version-string": "2.1.11-4",
"port-version": 0
},
{
"git-tree": "de61461b3ddd148fcce0ad0077e3ab66c23329e8",
"version-string": "2.1.11-3",
"port-version": 0
},
{
"git-tree": "ce0eed106e51862b3e1810af402b9cf2ba0c2bab",
"version-string": "2.1.11-2",
"port-version": 0
},
{
"git-tree": "9051d76e889e64c0bacb872069d62d0ac5eb6908",
"version-string": "2.1.11-1",
"port-version": 0
},
{
"git-tree": "bbb054e4dc1bbbd18887fc6a6cdb35abb9c08a17",
"version-string": "2.1.11",
"port-version": 0
},
{
"git-tree": "995edadf6e15a320af5ae0fcc5055074a25d0781",
"version-string": "2.1.10",
"port-version": 0
},
{
"git-tree": "e9ff8d204f14781a34b5937907539c2dbdaeb5d8",
"version-string": "2.1.8-5",
"port-version": 0
},
{
"git-tree": "761a8ed40dfb0282720dc59eaa0deaf6808abfef",
"version-string": "2.1.8-4",
"port-version": 0
},
{
"git-tree": "a0af7d1750ef9cb40881c97231e83f52624b463e",
"version-string": "2.1.8-3",
"port-version": 0
},
{
"git-tree": "2723fe4e19d8a81062fd8085e5b8d1f5c3f6174c",
"version-string": "2.1.8-2",
"port-version": 0
},
{
"git-tree": "a7979261bd1e0cab53cabc0206ee4e78547624fd",
"version-string": "2.1.8-1",
"port-version": 0
},
{
"git-tree": "2f29119492b98627d121d2eae04f4073f54df321",
"version-string": "2.1.8",
"port-version": 0
}
]
}