vcpkg/versions/a-/azure-macro-utils-c.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

70 lines
1.8 KiB
JSON

{
"versions": [
{
"git-tree": "a951ed2a9b24f8778b7c2fb2ff4e6a6577ac6472",
"version-string": "2020-06-17",
"port-version": 3
},
{
"git-tree": "5929e9b68ee080e5535eb12e48e182b04310ff0d",
"version-string": "2020-06-17",
"port-version": 2
},
{
"git-tree": "5f0ef9c1c4c9cae50a61b5f88497c3ca42146dfa",
"version-string": "2020-06-17-1",
"port-version": 0
},
{
"git-tree": "d6ae8d30c57b65db496154c80f8ca80992d5d1bd",
"version-string": "2020-02-04.1",
"port-version": 0
},
{
"git-tree": "1651a335030d25654378f8a3ae715ee40c424d5d",
"version-string": "2020-01-22",
"port-version": 0
},
{
"git-tree": "19841d0ff449cf59f69579d428e0e13572f6fb51",
"version-string": "2019-11-27.1",
"port-version": 0
},
{
"git-tree": "82ea324cb22549134cac1eaf5bd81916be6e8556",
"version-string": "2019-10-07.2",
"port-version": 0
},
{
"git-tree": "299721b78ac595310c35de9f80233ba604f27181",
"version-string": "2019-07-01-LTS-1",
"port-version": 0
},
{
"git-tree": "1f4f3443b1ed9d8051b10077c10fe0f1f4eeff0c",
"version-string": "2019-10-07.1",
"port-version": 0
},
{
"git-tree": "9d08ab1555940f0856e9dc339d30152a5242ca1f",
"version-string": "2019-08-20.1",
"port-version": 0
},
{
"git-tree": "2246a1b87f1e4147401c156928fccc8aca2e4889",
"version-string": "2019-05-16.1",
"port-version": 0
},
{
"git-tree": "05d3942ba6c1dd2d26eb8be9612308a337415a06",
"version-string": "2019-05-16",
"port-version": 0
},
{
"git-tree": "fdcc445c49e3c6ec45eedf634714baf7dbe6b0ec",
"version-string": "2019-04-11-1",
"port-version": 0
}
]
}