vcpkg/versions/d-/dimcli.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

65 lines
1.6 KiB
JSON

{
"versions": [
{
"git-tree": "025db5cad1969933359bac4047e0dea962fb692b",
"version-string": "5.0.2",
"port-version": 1
},
{
"git-tree": "da33c865acdf04845f77a46b89264544bfaf30cf",
"version-string": "5.0.2",
"port-version": 0
},
{
"git-tree": "508a42a39d654dd70909b5fea498b4b068ba6a09",
"version-string": "5.0.1",
"port-version": 0
},
{
"git-tree": "57a85674889c21c25770d674cee523e6040326e2",
"version-string": "5.0.0",
"port-version": 0
},
{
"git-tree": "4780b3c02c9a92cc283f2da1c35214cb6e0f4cf5",
"version-string": "4.1.0-1",
"port-version": 0
},
{
"git-tree": "80dd089d889a2cdcdb95305892ae046892eb7167",
"version-string": "4.1.0",
"port-version": 0
},
{
"git-tree": "c6b92cf16ca57984325782d235c5fa912d5d7d4e",
"version-string": "4.0.1-1",
"port-version": 0
},
{
"git-tree": "efa4837be64a9f13910f42f42acebeeceff9cd72",
"version-string": "3.1.1-2",
"port-version": 0
},
{
"git-tree": "bbd300e066b856253b1b8c0f0efb60a9541b24cc",
"version-string": "3.1.1-1",
"port-version": 0
},
{
"git-tree": "7c043529d43f507b1324fdc73894ec7fbdee7996",
"version-string": "2.0.0-1",
"port-version": 0
},
{
"git-tree": "f752db5c7989a9628b165cd449f2af19cf48d4d1",
"version-string": "2.0.0",
"port-version": 0
},
{
"git-tree": "bb50d32b30352fa1ebd31e92e488a519b3da87c7",
"version-string": "1.0.3",
"port-version": 0
}
]
}