vcpkg/versions/l-/libspatialite.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": "d7d124e4fcb212dba3d650817056ce23b6dc2a2f",
"version-string": "5.0.0",
"port-version": 3
},
{
"git-tree": "ac8547f60ac2cc08c65a907a84112e1256011a47",
"version-string": "5.0.0",
"port-version": 2
},
{
"git-tree": "b713a9368a0d53629cd8497cc82107ea6a33e980",
"version-string": "5.0.0",
"port-version": 1
},
{
"git-tree": "f63638cb7e228e76cebf7e4a6c28902b4738f907",
"version-string": "5.0.0",
"port-version": 0
},
{
"git-tree": "76f275137d1de3b27c6a68aa86f474f602ead042",
"version-string": "4.3.0a",
"port-version": 7
},
{
"git-tree": "57cdb2ba4a272e4b9bdc0ad0d61f8d24094a20af",
"version-string": "4.3.0a",
"port-version": 6
},
{
"git-tree": "3bf795ec31aa4b435e158e5191363a49861a1b52",
"version-string": "4.3.0a",
"port-version": 5
},
{
"git-tree": "4d6e107b36d3d4a7e4bfb2e8e8a2b6f07e009467",
"version-string": "4.3.0a-4",
"port-version": 0
},
{
"git-tree": "81e74e299a075afeb8d6256aa44b767bcdd3c7ed",
"version-string": "4.3.0a-3",
"port-version": 0
},
{
"git-tree": "ce9b2d52acc10ced1c7c3c5bd2dc8dfb8bd87a35",
"version-string": "4.3.0a-2",
"port-version": 0
},
{
"git-tree": "e5883f4df23942e5796219a355c0c1341066403d",
"version-string": "4.3.0a-1",
"port-version": 0
},
{
"git-tree": "f20ffed3d004f2e7b06f33a8a4ad9cdad9111da9",
"version-string": "4.3.0a",
"port-version": 0
}
]
}