mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 08:19:01 +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 ```
85 lines
2.1 KiB
JSON
85 lines
2.1 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "b6e0403e0e46d6b3aa07ea90da894a33589c3dde",
|
|
"version-string": "5.15.2",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "316f45b69eb023ba69d08d8de7a6debbf84bb603",
|
|
"version-string": "5.15.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "e7f00b17dc3a26603d86b756ed7edc5cea77d0c1",
|
|
"version-string": "5.15.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "ec237949790f5a82daa49f545cd283627ebd1cbe",
|
|
"version-string": "5.15.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "b6650cb3b8e6b4220e156da1b48ab1ab4b0ab44a",
|
|
"version-string": "5.12.8",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "17aa2b761c09d08f3c6fcc1cbc630ab425b826f8",
|
|
"version-string": "5.12.7",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "770014b18fc21d17ae1af2ec9ca48c4d6aec4bd3",
|
|
"version-string": "5.12.5-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "7324bf20f32b8bd9c18a54e5198ad9a2f59a5052",
|
|
"version-string": "5.12.5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "1dc27964a26d58f16e191d8dd3ac3d6d70ed9078",
|
|
"version-string": "5.12.4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "909427c2a51269c3cef3801df260f65236a98411",
|
|
"version-string": "5.12.3-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "904aa9f0396de49689545f5fe34e5dbe03cde9d6",
|
|
"version-string": "5.12.3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "5062e3e1e11d2a8a03783e328802fb518cfa7cd9",
|
|
"version-string": "5.12.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "84d6d638b706c52c97abfd5f10b418dc57065684",
|
|
"version-string": "5.12.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "95b0de657adc23a76abf3f5a185a0e48c2b1adcd",
|
|
"version-string": "5.11.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "41f7f2ce0039a1078e91bab0bb32a0541406c613",
|
|
"version-string": "5.11.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "9bb23039283d9129a43f3ba45c2f5e63387e4374",
|
|
"version-string": "5.9.2-0",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|