vcpkg/versions/b-/breakpad.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

120 lines
3.1 KiB
JSON

{
"versions": [
{
"git-tree": "be41998b0a407c10ae78d605264a2c0bb7d3f3ca",
"version-string": "2020-09-14",
"port-version": 3
},
{
"git-tree": "724ca1cc38bbb2414d1efe91f8a95353235ede58",
"version-string": "2020-09-14",
"port-version": 2
},
{
"git-tree": "e266c29cb65ac51e96422f0788dae07529f1f493",
"version-string": "2020-09-14",
"port-version": 1
},
{
"git-tree": "f088fa69e17bda03e45686245cb7dd47d0351064",
"version-string": "2020-09-14",
"port-version": 0
},
{
"git-tree": "7b2bb5f2a3d4995f52528e54cf3df165aace94d5",
"version-string": "2019-07-11-2",
"port-version": 0
},
{
"git-tree": "74c1e6008d13a09f9b8937445ff64d48234f3fdf",
"version-string": "2019-07-11-1",
"port-version": 0
},
{
"git-tree": "9f3e9c1eccd500bd649cad04fdcb202e49d09c53",
"version-string": "2019-07-11",
"port-version": 0
},
{
"git-tree": "10be3edd4e14259baa2f52e32cd4eae01b30940c",
"version-string": "2019-05-08",
"port-version": 0
},
{
"git-tree": "b07a4d267b3235725c4ee929190c6ce2c5cdb484",
"version-string": "2018-09-18",
"port-version": 0
},
{
"git-tree": "278889227ab763ac44bc3dbabd518cd0bfc71645",
"version-string": "2018-08-03-1",
"port-version": 0
},
{
"git-tree": "70da3dfcfebdff3f898651e9723f222d0b493259",
"version-string": "2018-07-30-2",
"port-version": 0
},
{
"git-tree": "9625e031da06b22fe747b1fd39815c3b051ead08",
"version-string": "2018-07-30",
"port-version": 0
},
{
"git-tree": "f85b4570ca43263fa600caeae3b5d601a0d64bfb",
"version-string": "2018-07-08",
"port-version": 0
},
{
"git-tree": "5a923eac9f23d816a62e08c9dbb227be2106ef3b",
"version-string": "2018-06-28",
"port-version": 0
},
{
"git-tree": "cc07770bafeafa162ef126bc5ad3abad0900567d",
"version-string": "2018-06-12",
"port-version": 0
},
{
"git-tree": "4c60174bc8dafd05e1fa12dbf3075bb937ec605d",
"version-string": "2018-04-17",
"port-version": 0
},
{
"git-tree": "349bcf71e14497bd57b12e69549004cbb41e0fcd",
"version-string": "2018-04-12",
"port-version": 0
},
{
"git-tree": "09fd05fac620d5c99716ec0023ea1af091870852",
"version-string": "2018-04-05",
"port-version": 0
},
{
"git-tree": "e2981e346f312045c0d47aa5eac9fff7ede2655d",
"version-string": "2018-03-27",
"port-version": 0
},
{
"git-tree": "fc5ce981eec58bcdd21d03618a583e9c85a5aa03",
"version-string": "2018-03-13",
"port-version": 0
},
{
"git-tree": "cb9c3c17a2ca2f8cc40ad1f76f16f4f10bc86ca8",
"version-string": "2018-02-25",
"port-version": 0
},
{
"git-tree": "ad0a5faf3f0c2cac452c9979101b6b1162e63591",
"version-string": "2018-2-19-1",
"port-version": 0
},
{
"git-tree": "a7347475d92becb8bd1e4a30c799918a41c1b919",
"version-string": "2018-2-19",
"port-version": 0
}
]
}