mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 10:29:00 +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 ```
105 lines
2.6 KiB
JSON
105 lines
2.6 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "6f6ca0b9e789dbfafa84ca02eec3da94f2728494",
|
|
"version-string": "5.15.2",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "75366d3ba0a38fc7be899ea1a67c74e6adb379e1",
|
|
"version-string": "5.15.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "6144ff48982bb3c848ed9c5ba3a517188963411b",
|
|
"version-string": "5.15.1",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "cb235d0329a2ac6be7841bb996e258615181cdc7",
|
|
"version-string": "5.15.0",
|
|
"port-version": 2
|
|
},
|
|
{
|
|
"git-tree": "eac65b172ddde4ae08ce25376d47db96a04ecc9a",
|
|
"version-string": "5.15.0",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "3a28ac2c3d51f8f094fe32df3d9507d7691b6310",
|
|
"version-string": "5.15.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "fc40636bbb3f94383065e71a5b06f283a5522594",
|
|
"version-string": "5.12.8",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "1f33b86cd72616afbb1acc9b9955d59bdca9ac05",
|
|
"version-string": "5.12.7",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "0daeb06e83804c9882040184a33b5a2e2c3ef7b8",
|
|
"version-string": "5.12.5-3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "e092b3bcecf37eb12e50eab216f5129957e30b03",
|
|
"version-string": "5.12.5-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "0055558f1aacde047f802d080184ba11fc4bbc36",
|
|
"version-string": "5.12.5-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a2582f793b58a2373bf1bf801fcb36f9749731b5",
|
|
"version-string": "5.12.5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "0532c51ad2b9debe84afe7374f30d00d2a573b42",
|
|
"version-string": "5.12.4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "3f08c3a43e43029308814d1e9c531915b1a368c0",
|
|
"version-string": "5.12.3-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "fde1acedd22e43a51ae632d8947a799b455f42e5",
|
|
"version-string": "5.12.3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "8b58ae0155829d3935637cf1df713c7e6e98f168",
|
|
"version-string": "5.12.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "9799c0a71ad00b709473371e6d057eaf1f330177",
|
|
"version-string": "5.12.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "e2984be2c2e0ad47c17960f324e2abe96c96395e",
|
|
"version-string": "5.11.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "40b02e188e97c283191549d2bdc81994027eabb8",
|
|
"version-string": "5.11.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "e800376f4a6700949da02f9159a5a6da22a64091",
|
|
"version-string": "5.9.2-0",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|