vcpkg/versions/u-/urdfdom-headers.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

50 lines
1.2 KiB
JSON

{
"versions": [
{
"git-tree": "557188bd804b7c57c882f39710ca21deb1b91db5",
"version-string": "1.0.5",
"port-version": 2
},
{
"git-tree": "5dd339affc1eeaab090a5052621566424cee912e",
"version-string": "1.0.5",
"port-version": 1
},
{
"git-tree": "1e778111ef229d80dbff478b4807b5cfdf273a19",
"version-string": "1.0.5",
"port-version": 0
},
{
"git-tree": "c32a3e45b98f2a90770bd907152b061f50c76cda",
"version-string": "1.0.4-1",
"port-version": 0
},
{
"git-tree": "4830c030ecb6400e15e07d3c78b6b84143a201cb",
"version-string": "1.0.4",
"port-version": 0
},
{
"git-tree": "1a3d49fb253e7fe125764d8f668c2ead9632f15a",
"version-string": "1.0.3",
"port-version": 0
},
{
"git-tree": "409aae792651465f223a827e5afc443227f90708",
"version-string": "1.0.2",
"port-version": 0
},
{
"git-tree": "1ec61fa534279a9903753795626c76422ab5b685",
"version-string": "1.0.0-2",
"port-version": 0
},
{
"git-tree": "f4ac1d1d403f9e9a16ed7721bfa583edde47eb89",
"version-string": "1.0.0-1",
"port-version": 0
}
]
}