mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 04:09:01 +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": "48423df98f8715a1f33c2abdfcfc0c0bf5cc5f92",
|
|
"version": "2.0.6",
|
|
"port-version": 2
|
|
},
|
|
{
|
|
"git-tree": "88d4315ae4daa0619554d0465564beee0a688d71",
|
|
"version": "2.0.6",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "42aed1a37d04ecdc437a4f52c6dd71740339f478",
|
|
"version-string": "2.0.6",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "0c5889f679a9404504230cb568df8f1f1263cbba",
|
|
"version-string": "2.0.5",
|
|
"port-version": 4
|
|
},
|
|
{
|
|
"git-tree": "cf4b226059c3e824fc31962ba1afde783f7f1833",
|
|
"version-string": "2.0.5",
|
|
"port-version": 3
|
|
},
|
|
{
|
|
"git-tree": "769ce1b935b91ea1ec2f3d76cd3708dec3e1b565",
|
|
"version-string": "2.0.5",
|
|
"port-version": 2
|
|
},
|
|
{
|
|
"git-tree": "0cc64a738991909ff19e91167458517fec81c63d",
|
|
"version-string": "2.0.5",
|
|
"port-version": 1
|
|
},
|
|
{
|
|
"git-tree": "49f7653ab5a15a52511b05a3fbadc4e6126b2031",
|
|
"version-string": "2.0.5",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "5a4d55bc4c964d84a8ed03f61a1ecd7937c4a066",
|
|
"version-string": "2.0.4",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "61a5d22ba7121fd7bbb445371b48abaf27bb650e",
|
|
"version-string": "2.0.3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "58fb3b2fd2cca2185bfce8035019e2dc295740b5",
|
|
"version-string": "2.0.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "ceafc2a970c04c9c391fd3d020de793a7573e203",
|
|
"version-string": "2.0.1-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "f5006e3c642292f8e287c4f85d4697a170252115",
|
|
"version-string": "1.5.3-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "15b8e5e07bf506f4eab4fc29219c35acf110b1fa",
|
|
"version-string": "1.5.3-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "360a48e9c4d7cff45917c0019190043cf0e5a1a3",
|
|
"version-string": "1.5.3",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "26dcc564116a6350ce1be8e530b820434733b22e",
|
|
"version-string": "1.5.2-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "06b4287c029a8684485e937a28b1cd32dd2c4194",
|
|
"version-string": "1.5.2-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "b4016b566b7d8d51ebf7607be142fb51ea9432a0",
|
|
"version-string": "1.5.2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "be8bea575e46448d133a68b628f8b637d417b3fe",
|
|
"version-string": "1.5.1-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "9247fbac463498da5095cef9d680f3c0b3544754",
|
|
"version-string": "1.4.90-1",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "080f92f39008e2f69b00ff1f474b1ac344fbafc5",
|
|
"version-string": "1.4.90-2",
|
|
"port-version": 0
|
|
},
|
|
{
|
|
"git-tree": "27233b528c1e7d9e9e468521d2b58473cc0a2b37",
|
|
"version-string": "1.4.90-1",
|
|
"port-version": 0
|
|
}
|
|
]
|
|
}
|