mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 17:49:03 +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 ```
145 lines
3.7 KiB
JSON
145 lines
3.7 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "2b845a54aa220fa4099e97be4031cb63634665e3",
|
|
"version-string": "3.3.9",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "7a4f98a4624de567ff1bf9fa82668eae42e0f996",
|
|
"version-string": "3.3.9",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "b9090476c373e1c73df0317dae84015a8fac7432",
|
|
"version-string": "3.3.7",
|
|
"port-version": 8
|
|
},
|
|
{
|
|
"git-tree": "97b93ce8d10cc8f3bdf74f78491468fce1b6c86a",
|
|
"version-string": "3.3.7",
|
|
"port-version": 7
|
|
},
|
|
{
|
|
"git-tree": "9c582bb3f87a1a71b8fe7730581f864b8707d301",
|
|
"version-string": "3.3.7",
|
|
"port-version": 6
|
|
},
|
|
{
|
|
"git-tree": "49b1725f9d03cfbf6a6a853b026eea34a86ee5d6",
|
|
"version-string": "3.3.7-5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "81980716d7c7849b0fab6092b17b0a943c15cdea",
|
|
"version-string": "3.3.7-4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "1ffdcc022c0b77d3064152c96892a36d79391de2",
|
|
"version-string": "3.3.7-3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "2cbe54ff3e01f1e4403d0dde5cb98e7fb6ec8ceb",
|
|
"version-string": "3.3.7-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "0f4d4403e7b923e0d60f97a7efd49fdd5890c864",
|
|
"version-string": "3.3.7-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "65f6abba610b69501020eb8c7e7c8d8c4f87d357",
|
|
"version-string": "3.3.7",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "406065e68c5511732b80145bed1c705159146738",
|
|
"version-string": "3.3.5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "8e37c6450cc0522686593205f4c9af0d5748cdb6",
|
|
"version-string": "3.3.7",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "890d508bcf2929d80518ba37d7954f0d15c85e20",
|
|
"version-string": "3.3.5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "8ae375528d7e019a8631cce1924f626b5589165f",
|
|
"version-string": "3.3.4-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "27640ace725d230c153be186d847a1dad97ff4ba",
|
|
"version-string": "3.3.4-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "9fc7f6a3467ba8db529ded6b6b5541022cf323eb",
|
|
"version-string": "3.3.4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "ba6106ad2ba44fc13cf8db3a01d2690a219ddf11",
|
|
"version-string": "3.3.3-5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "34706ca3d5496a286babfaf6d936fa6ddbb51243",
|
|
"version-string": "3.3.3-4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "aecb6d1159e2f8b018670a688b91b93f034fa46c",
|
|
"version-string": "3.3.3-3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "1b866fd4ca43b31b332edc72acd37f44bce28975",
|
|
"version-string": "3.3.3-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "83e7a4ad48a0f83722e5c3b57a314c3419307e12",
|
|
"version-string": "3.3.3-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "82fd5a5591c9ff4f052893f4621da24f652ebdc0",
|
|
"version-string": "3.3.3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "3d38e168d81ed1c2fb5153ac6f6d52bf3e07eee4",
|
|
"version-string": "3.3.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "5200130549e5b6e42ecd3f7d4a517fe7c7ac0ced",
|
|
"version-string": "3.2.10-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "62a2861278fa08d17d28a507874d2b3beb12a599",
|
|
"version-string": "3.2.10-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "f6ff87ce8b7ddd61c0ca0bbc31104ec565d321cf",
|
|
"version-string": "3.2.10",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "2f8ec62522a95c5f8a34aa9cc2ddd00bb0e8974e",
|
|
"version-string": "3.2.9",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|