mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 11: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 ```
125 lines
3.2 KiB
JSON
125 lines
3.2 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "241189f2a82d541c88b682f409518b5802dcb39e",
|
|
"version-string": "2020.06",
|
|
"port-version": 7
|
|
},
|
|
{
|
|
"git-tree": "3aedbba0e9e694651549ff34fba8d6eeeb3fdde6",
|
|
"version-string": "2020.06",
|
|
"port-version": 6
|
|
},
|
|
{
|
|
"git-tree": "457d2fb07dd06abe61d8bdee77bc5dc1ff9391a5",
|
|
"version-string": "2020.06",
|
|
"port-version": 5
|
|
},
|
|
{
|
|
"git-tree": "05b4c54140907b0b46926c50e0b56bc80051b218",
|
|
"version-string": "2020.06",
|
|
"port-version": 4
|
|
},
|
|
{
|
|
"git-tree": "79988d3cd16038434cacef0e4423f3b2e64f0a1b",
|
|
"version-string": "2020.06",
|
|
"port-version": 3
|
|
},
|
|
{
|
|
"git-tree": "b9b701869c5d4f5f4203702622d2bbfa58b6517f",
|
|
"version-string": "2020.06",
|
|
"port-version": 2
|
|
},
|
|
{
|
|
"git-tree": "bc7aca74b45fcc3c73d3b0d051e63602c270f0b4",
|
|
"version-string": "2020.06",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "e304b1601c5af2983d465dfebdb22627ff57415d",
|
|
"version-string": "2020.06",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "d9eb35936e65c09eeecbd25d95a47ecf02721fb5",
|
|
"version-string": "2019.10-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "8f0d46d8eb57ad3ceb3f064572eded5e08888332",
|
|
"version-string": "2019.10-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "e721cd18e640536d974e2442da00e677e78fb104",
|
|
"version-string": "2019.10",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "f5f2732d5185dda0c8813d4aa318dd543de4d06c",
|
|
"version-string": "2019.01-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "f0f226b75fae7fc5777b12c216c984a8a296ae48",
|
|
"version-string": "2019.01-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "b7d6885b19addc1a9f8800cce02972ed395fcd05",
|
|
"version-string": "2018.10-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "7c37dff60ec4814e56fc3ead712b6f1a157d1210",
|
|
"version-string": "2018.04-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "28aec10970796b877515c9d4a69625466cc5de31",
|
|
"version-string": "2018.02-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "364bb1be74111519012b68bb29813d65145bfe8a",
|
|
"version-string": "2018.02-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "39954a77d2b913d039d78d12780855e3b4ee9beb",
|
|
"version-string": "jan2018-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4c17387a0d1ac983428c880a8becb03287a8fdcd",
|
|
"version-string": "jun2017-5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "44787d3c100654d2bd1aac17cfb4322c879eca13",
|
|
"version-string": "jun2017-4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "eda85e5b703cddecb4b48cb8ba498c4a6109e35f",
|
|
"version-string": "jun2017-3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "dfae148d64586ffd4a75fbf6fc81c901452166ae",
|
|
"version-string": "jun2017-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "050a7a0e0c527549ef341f7e824baf51d522814c",
|
|
"version-string": "jun2017-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "3d29bec696bc176f6bde382887eedc025d095978",
|
|
"version-string": "jun2017",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|