mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 06:29:05 +08:00
b295670e4b
``` 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 ```
150 lines
3.8 KiB
JSON
150 lines
3.8 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "242bb84480e51b70b53dbd9b126f600e1ea39ef6",
|
|
"version-string": "7.5.0",
|
|
"port-version": 2
|
|
},
|
|
{
|
|
"git-tree": "2b3b868fab128f5e37adeffcde308124512d25e0",
|
|
"version-string": "7.5.0",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "2f95f8b92596e23af8db61cd1b4e11a06078015f",
|
|
"version-string": "7.5.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a959aee61eeba3a31e035f78118a0894b67a2bfb",
|
|
"version-string": "7.4.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "bc34d8e584b67a85f79264d0e259163a51680dcb",
|
|
"version-string": "7.3.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "0d153822a012b3b858eea2ef866ae6c9f0d60ebf",
|
|
"version-string": "7.2.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "099e98f46bf9a1360d6e139a391766bb4436e676",
|
|
"version-string": "7.1.0-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "91c1b8fcf36f2ba7e97f6724b77da2ef76fbb516",
|
|
"version-string": "7.1.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "c449a7819d020f486f971bba480e55faf3d2bd41",
|
|
"version-string": "7.0.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "3932b14ec40b79f338f8d9bcfa39250465df4a51",
|
|
"version-string": "6.1.0-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "d15a10ff5b204a33653cea5b1ab14373a3a93afc",
|
|
"version-string": "6.1.0-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "464ab45096c32986d063da8157de284b548ab108",
|
|
"version-string": "6.1.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "5604ed9c7a670dfb03415213318cf8830037b2b7",
|
|
"version-string": "6.0.0-3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "72310adf4a4239bdc29dabb9b9c78954100f9eca",
|
|
"version-string": "6.0.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "7e3b2c2691b4202f0f43ae2af11ff05691c865e2",
|
|
"version-string": "5.2.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4cfca65bd62b171742e3c3ed55ca51e194f684a2",
|
|
"version-string": "5.1.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a9cb3b3f2f17cc2608f31f6634b4772d8396787c",
|
|
"version-string": "5.1.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "ca6caf3d6959b308f6ca6b5c055d75d90aa64cdd",
|
|
"version-string": "5.0.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "bf972195233f5b6c78874757b6b5590d8dafc9bc",
|
|
"version-string": "4.0.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "8ad04fdbfe0e29af2ddc9ac13a443861ea05f6c5",
|
|
"version-string": "3.2.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "c5a231ec907f5b18009a22725de36d5ed420ff6d",
|
|
"version-string": "3.2.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "2cc5b2823c57a603b7ebc4f9a1f3c556d3bfd836",
|
|
"version-string": "3.1.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "d24d43fa7d807cc0000f833fbfc07397d9bb864c",
|
|
"version-string": "3.0.0-4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "ff41aa4982c80be4a9fec1b87055a636bf50df0a",
|
|
"version-string": "3.0.0-3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "d547c4343ed3d21b28f1afa55bfca3cd06395e9b",
|
|
"version-string": "3.0.0-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "10d9f0c7e3110bdf5d6b317921c051b0b5536a57",
|
|
"version-string": "3.0.0-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "770d68a119da409998480068b307d492eb98083a",
|
|
"version-string": "3.0.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "c08dceda7dd8bcdec488a8e27f215d0785b46ad2",
|
|
"version-string": "2.6.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "241728cab83f4a4bc8269cc5855d9f0ce2508bfa",
|
|
"version-string": "2.5.0",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|