vcpkg/versions/l-/libssh.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

105 lines
2.6 KiB
JSON

{
"versions": [
{
"git-tree": "0eb17d68736a224ca8ce341b1b84bbae2f2f43a5",
"version-string": "0.9.5",
"port-version": 6
},
{
"git-tree": "d49a7a228c1f082d7e86bfb443af3a063a692ac7",
"version-string": "0.9.5",
"port-version": 5
},
{
"git-tree": "0c5ced4b1fab4db90e2b032a3339a404cdc2f3ab",
"version-string": "0.9.5",
"port-version": 4
},
{
"git-tree": "7436981a351a747649d03c4a27a06dc0bc3a0d16",
"version-string": "0.9.5",
"port-version": 3
},
{
"git-tree": "a9b49412296a9eec38c564afa33555a92898a11f",
"version-string": "0.9.5",
"port-version": 2
},
{
"git-tree": "bf1fb5ae9324823a60784a5ed0ecbca8a3325214",
"version-string": "0.9.5",
"port-version": 1
},
{
"git-tree": "a9db7620dc774257483a98c9c5309dbb7eff8263",
"version-string": "0.9.5",
"port-version": 0
},
{
"git-tree": "e6abfa633623458bf8c58025435c0a707bf0fb1c",
"version-string": "0.9.3-2",
"port-version": 0
},
{
"git-tree": "8f14c7ec09f7d0d29c691fc9b225d6a67761db7a",
"version-string": "0.9.3-1",
"port-version": 0
},
{
"git-tree": "0a6feb828d27c5ee860145508a17ede4e7a1e73a",
"version-string": "0.9.3",
"port-version": 0
},
{
"git-tree": "ee6061def32a105af072e75d61f0de95a6fdec14",
"version-string": "0.9.0",
"port-version": 0
},
{
"git-tree": "b2fa5e9b88af986ee5c817a6b99c185132af3781",
"version-string": "0.9.3",
"port-version": 0
},
{
"git-tree": "10c4e4dd3e0b3d524dfb75f7295db75930fcb1e9",
"version-string": "0.9.0",
"port-version": 0
},
{
"git-tree": "44d8f2b3b277e909d608c68049230b5f4ea5ccfa",
"version-string": "0.7.6-1",
"port-version": 0
},
{
"git-tree": "4145721a2592ce28523e1ece83cd3eb8fe0ed7c3",
"version-string": "0.7.6",
"port-version": 0
},
{
"git-tree": "cd2e1e955f2d79a9e36bb6930f01c98a18d9ca65",
"version-string": "0.7.5-4",
"port-version": 0
},
{
"git-tree": "f2ef7bc5dc9d0003d7647ee7b6b9a04b23596a98",
"version-string": "0.7.5-3",
"port-version": 0
},
{
"git-tree": "1dceea4b45e9099aebdef27ac5b6ae4a8219873d",
"version-string": "0.7.5-2",
"port-version": 0
},
{
"git-tree": "4efe97ee1e31efd2b6fbeb69ba6974ea40173591",
"version-string": "0.7.5-1",
"port-version": 0
},
{
"git-tree": "4ee8a7bd27fed40a2cce00ac57d7f98dcba69d04",
"version-string": "0.7.5",
"port-version": 0
}
]
}