vcpkg/versions/g-/gdcm2.json
Billy O'Neal b295670e4b
Bulk convert control files. ()
```
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

70 lines
1.7 KiB
JSON

{
"versions": [
{
"git-tree": "47f14257c43fffb30109bab99c9ae594007f3617",
"version-string": "deprecated",
"port-version": 1
},
{
"git-tree": "dfe78f1df5d0fc56c69eeea5096e093cbd6499e5",
"version-string": "deprecated",
"port-version": 0
},
{
"git-tree": "af9178d0515bc8019a0863f171533989ad4a2596",
"version-string": "2.8.9",
"port-version": 0
},
{
"git-tree": "4e514d0621af19f1fbe1ccaf51d28722603a0fa7",
"version-string": "2.8.8-2",
"port-version": 0
},
{
"git-tree": "92ec32d0d5cf7d8fcf4d3aef5070b0b5af7c7505",
"version-string": "2.8.8",
"port-version": 0
},
{
"git-tree": "87cf0d35f157ef37ef7501df468c3f26447cf620",
"version-string": "2.8.7",
"port-version": 0
},
{
"git-tree": "1a82ec04d2689902bed84bfe47bd02e31deaa5b4",
"version-string": "2.8.6",
"port-version": 0
},
{
"git-tree": "11dc452146814541826f33caba0f130ee3d0cbab",
"version-string": "2.8.5",
"port-version": 0
},
{
"git-tree": "b38c43fcae1d8aacf12a892bb0258e11c933c979",
"version-string": "2.8.4",
"port-version": 0
},
{
"git-tree": "ded71c576a891ef907f2216750a1a479d6d39ba2",
"version-string": "2.8.3",
"port-version": 0
},
{
"git-tree": "83d3297813e834c6d175d94219a1fb35ae06c848",
"version-string": "2.6.8-1",
"port-version": 0
},
{
"git-tree": "f746dd83ce41698054fd9468c3c05a9644fac3ca",
"version-string": "2.6.8",
"port-version": 0
},
{
"git-tree": "4c5050c55886cffff0cf870fa165d166fc0439a5",
"version-string": "2.6.7",
"port-version": 0
}
]
}