vcpkg/versions/f-/fribidi.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

60 lines
1.5 KiB
JSON

{
"versions": [
{
"git-tree": "88696509b4e846e3f04283bcf928db39800cc4eb",
"version-string": "1.0.10",
"port-version": 3
},
{
"git-tree": "197340b9f9db2c444b70c27b54cfbe0ce3601c0b",
"version-string": "1.0.10",
"port-version": 2
},
{
"git-tree": "cfd7b4f4b0342721b50ef5eab54510351797e343",
"version-string": "1.0.10",
"port-version": 1
},
{
"git-tree": "40cbd20c8b1111f20989db2341eadd77a2935ba2",
"version-string": "1.0.10",
"port-version": 0
},
{
"git-tree": "b450252220350ac81b7ffe9da01b5ab8a591f282",
"version-string": "1.0.9-1",
"port-version": 0
},
{
"git-tree": "c331cf608aabdbf5014c8ce53ce28535e7d0d056",
"version-string": "1.0.9",
"port-version": 0
},
{
"git-tree": "6f7db7694f8d226c6e7819ceabb6c9dfadf7a5e7",
"version-string": "2019-02-04-3",
"port-version": 0
},
{
"git-tree": "6b759ba74a5377a29b53383857f603e29d2272ce",
"version-string": "2019-02-04-2",
"port-version": 0
},
{
"git-tree": "17cdd47123a95be41d62c67043d6195e0bc352b9",
"version-string": "2019-02-04-1",
"port-version": 0
},
{
"git-tree": "de69bf0436d96861f2d9b48ce70537babfe717db",
"version-string": "58c6cb3",
"port-version": 0
},
{
"git-tree": "63d551d740ff3476f8047fbc11c06f4c420898b0",
"version-string": "1.0.5",
"port-version": 0
}
]
}