mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 21:49:06 +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 ```
110 lines
2.8 KiB
JSON
110 lines
2.8 KiB
JSON
{
|
|
"versions": [
|
|
{
|
|
"git-tree": "a6c8562f7ec58b04278fb8985f9c7bbd5143158e",
|
|
"version-string": "1.3.36",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "583006cf5cb77ea009d82d0b3226c3d2c4011ae4",
|
|
"version-string": "1.3.36",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "d9178814498d48e9814853ec809ae9fdff3ec224",
|
|
"version-string": "1.3.35",
|
|
"port-version": 3
|
|
},
|
|
{
|
|
"git-tree": "17cc4b0e81f234abbfc38d4def9f5c3671354462",
|
|
"version-string": "1.3.35-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "3982c8bfa0248f3fe83605b944ef5b2a49f602df",
|
|
"version-string": "1.3.35-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "b509aad411b616688af929e9ed12fe9d5b099d63",
|
|
"version-string": "1.3.35",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "8e05a9f0d5df4ad092eab2d1c932014422f837bf",
|
|
"version-string": "1.3.34",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "97217cd2bea991ebae4c4f64e6baaff0c95b83bd",
|
|
"version-string": "1.3.33-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "eab30046a2c3c68d8eb9f7930ea3b6b602266641",
|
|
"version-string": "1.3.33",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "1f739b89dbf1389d435841f3bd9a2d083321828f",
|
|
"version-string": "1.3.32-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "7b89e875e52f834f2e6dc84b4b52458d27132b51",
|
|
"version-string": "1.3.32",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "782a17a069f0757b56872e9907bda5a0c1988350",
|
|
"version-string": "1.3.31-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "080a85fc351370ae83920cd23211f8ad1f802798",
|
|
"version-string": "1.3.31",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "659c2a03426b6b0630e526d63384a97672988d8a",
|
|
"version-string": "1.3.30-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "a59532845bdda37245a2bd4d93ac0847d96617cd",
|
|
"version-string": "1.3.30",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "d1c4d3a1d273bb319e3f7addec2d920675bd492e",
|
|
"version-string": "1.3.29",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "257e5f04c747b2c9c68c3e95e15ff89def37e61b",
|
|
"version-string": "1.3.28",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "819d4cb9a9ea3d07612479608faf6d757eab2ed5",
|
|
"version-string": "1.3.26-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "b1cb90ce62353c49edb5d463b588e0a78a2f7e19",
|
|
"version-string": "1.3.26-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "574ced3b87c620299ffedc0797c41609c6efb3ed",
|
|
"version-string": "1.3.26",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "c5868428eda89f9e1b34a0c9b7c2bebbabc4cebf",
|
|
"version-string": "1.3.25",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|