mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 10:09:08 +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 ```
160 lines
4.2 KiB
JSON
160 lines
4.2 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "32e499733540c4e81d0059159497ebd645ffd11f",
|
|
"version-string": "2020-09-14",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "a7ce454c4b0c719031a5251cd4cc74d0e0376ec5",
|
|
"version-string": "2020-09-14",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "58c798c1aa4450c0325bf0c2e29238aa1c35dc45",
|
|
"version-string": "2019-07-11",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "5eb400bafec5174122e7bcba550b73285f6a104a",
|
|
"version-string": "2019-05-07",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4151c82d1e0cf58dcff920022bdebe0e31925cd5",
|
|
"version-string": "2019-04-19",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "e7d59e0048da1ca2bc0e5a89abbdc7f7f5efe630",
|
|
"version-string": "2019-03-29",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "3d3a94fc60b18fa21aeca06cf4c2082850f3ee53",
|
|
"version-string": "2019-01-30",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "09b8c34dd94d0d0eff0c2ccb28a0fe7908d067ae",
|
|
"version-string": "2019-01-09",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "f16f77c30216730bf0db13ea404d9e6d7819aad4",
|
|
"version-string": "2018-12-14",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "37b523b444450f2e70fdc433d07fdac87b11fbb2",
|
|
"version-string": "2018-10-25",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "23fa4496b1d39cbfcd4f8d42ab259679135dc2dd",
|
|
"version-string": "2018-10-11",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "72dd052029913817bfd6b722b9d31fa500893fc1",
|
|
"version-string": "2018-09-18",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "2cae29e873fa35b8d00785643b94ab7ef6caaed0",
|
|
"version-string": "2018-07-30",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "64230b8ec3e92ed3cdab25b214e0474f970440e7",
|
|
"version-string": "2018-07-08",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "fa58926cf85d29e10f0dd070277bc9bcb6529a08",
|
|
"version-string": "2018-07-03",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4562ad16a3851b904efd340c7e0f4320165968fc",
|
|
"version-string": "2018-07-01",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "47d51cb93fb199d8250ef3f7b7c8de69e6da0525",
|
|
"version-string": "2018-06-15",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "6ce7f6fa8c5357a42c5a3ab57f0177368eaac381",
|
|
"version-string": "2018-05-17",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4f5248863e9ae46ef4f01ca226d37d725fe8638f",
|
|
"version-string": "2018-05-01",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "f1d5d6a55d4ace7ef6041cedd8a90ddc7e811c32",
|
|
"version-string": "2018-04-25",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "6ea5b287f2a33069f461b60c16d7f2158f8de84e",
|
|
"version-string": "2018-04-12",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "39ba641821381be7d8ed7b986e98b2f10a9104d5",
|
|
"version-string": "2018-04-09",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "ce03bc199940abddafb0d5a09e8c6c803b9dff4d",
|
|
"version-string": "2018-04-06",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "255500f1b230ba6ce8d100ee0edcb5af3d4a6338",
|
|
"version-string": "2018-04-05",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "2b9d817348c033840d9c3fa66dbf3a47acd7ec9b",
|
|
"version-string": "2018-03-29",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "9e7be4a63c2e499f9155accd62943c6af8f1913c",
|
|
"version-string": "2018-03-17",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "69c257f9c3ce8d27ebe51979704ca1a37997bedc",
|
|
"version-string": "2018-03-11",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "71695c67eaebc2f963af47f03caecd22ee0424c8",
|
|
"version-string": "2018-03-07",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "603ff607c03a4d9b038ef88c90cffa98bd00ba3b",
|
|
"version-string": "2018-03-02",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "d29b421eb1cd4e85a29227700df9cbf7b440c8c9",
|
|
"version-string": "2018-02-25",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "ff8435c7ba0300d1a5205464aa0ee3c8faba06b7",
|
|
"version-string": "commit-1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|