mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 23:59:37 +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 ```
115 lines
2.9 KiB
JSON
115 lines
2.9 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "1d3b1c0ba6b473d5b5e77ca515e74e90567e2965",
|
|
"version-string": "4.5.0",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "4e770dbe450a78c88a5d607926eaf854e15cd546",
|
|
"version-string": "4.5.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "4d0eb851ee2773cd7f529f5c2d91d5ca81929982",
|
|
"version-string": "4.4.0",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "6dd6103fe267d4e998e3d1ad46a647b25842eef0",
|
|
"version-string": "4.2.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "db8b3a3d40de1196e90c0bd8b73d26e4b441035c",
|
|
"version-string": "4.2.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "31991957952fe3e68aa37474500be965ddf270d8",
|
|
"version-string": "4.1.1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "7053d949f20f0b28c8086ec6398b5bce082ee943",
|
|
"version-string": "4.0.5-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "16e676ad9f4ecda601ed0d9165329b4f2a1bdca3",
|
|
"version-string": "4.0.5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a009101b74c6894462278f0d7b08575cd93e4a9a",
|
|
"version-string": "4.0.5-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "8171b0d999ac2b8c6bc9168e6bd7539f7187faed",
|
|
"version-string": "4.0.5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "6f635befc383f6070f5b8c6e0acbcc9bffd6073d",
|
|
"version-string": "4.0.4-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "3efde70d1bf7a0c29533e963d10348cdba7d377d",
|
|
"version-string": "4.0.4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "7856d96209a218eef8cd14bc6638aacea98ac38f",
|
|
"version-string": "4.0.3-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "7b1413ad25b7f205829a643e853bf8e85695e724",
|
|
"version-string": "4.0.3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "db37461817f2d452fa3d11a9e5d463f9bec73b94",
|
|
"version-string": "4.0.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "47e23dd5394f3bf7ef2c370ebb631efea170c4d3",
|
|
"version-string": "3.3.7-4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "8f878a7ff834d47df1f29ab593e727b2300fd5dd",
|
|
"version-string": "3.3.7-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "67b260cc1dd9a3264f22e139881f87b4f09bb04d",
|
|
"version-string": "3.3.7-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "296f517371615021ecb35c5ea2f7dda9378ec619",
|
|
"version-string": "3.3.7",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a3fdf30ecd67280bee07f78377b3c6f8a7a872d6",
|
|
"version-string": "3.3.6-3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "87c3e4d46de0c6a6151c30bcb4fd6d38733adfa6",
|
|
"version-string": "3.3.6-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "931ee43ee612664d319c58baed5f6156187e215d",
|
|
"version-string": "3.3.6",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|