mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 09:28:59 +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 ```
90 lines
2.2 KiB
JSON
90 lines
2.2 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "7548a80471fd031625a4395776ea298e2737c280",
|
|
"version-string": "5.15.2",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "f0d59c9b5c88380e1eb89cd7f47b31299ca2367b",
|
|
"version-string": "5.15.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "e905f4cbd556e9c21792772111a6d9fe55a4da16",
|
|
"version-string": "5.15.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "367ba76601cb738680f517a876a5951b35bbd1b8",
|
|
"version-string": "5.15.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "1acade397cfff61f42847509cf819ec614555b7e",
|
|
"version-string": "5.12.8",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "bc3ca858a7f392917a9417df03d0e29514fb572f",
|
|
"version-string": "5.12.7",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a07cd94104aedf96abe6605fb10de351a1b1cd7d",
|
|
"version-string": "5.12.5-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "e4b43d0873d58c1c4e10301e167dbca83979b126",
|
|
"version-string": "5.12.5-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "8279e9f7555856af1cd28563d08c1467079d2546",
|
|
"version-string": "5.12.5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "8143a32817ceaf8e66f7a375b9d83732270ab342",
|
|
"version-string": "5.12.4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "20f9551fc319d90b673f7c0b252040a7c7e5d676",
|
|
"version-string": "5.12.3-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "2f68a0214dfd82d79d7ba429b7497d83e99a0bca",
|
|
"version-string": "5.12.3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "2b0da997cd76c8d9a3e06bd8a445c0be088f72a1",
|
|
"version-string": "5.12.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4b4164eaacd512d5dd0c604f78153ab8af420fcd",
|
|
"version-string": "5.12.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "0bd318e81579d4d747821f115231116717a66df0",
|
|
"version-string": "5.11.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "ac55307fa4b4a9af9d59bd3e6436f547a6a1e679",
|
|
"version-string": "5.11.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "5eee2528f6d54c4713b32cb7b0118a556a22ac3b",
|
|
"version-string": "5.9.2-0",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|