RelEng: Teach ServicingPipeline to infer the version if it's null (#13439)

```
% .\tools\ReleaseEngineering\ServicingPipeline.ps1
Inferred servicing version 1.14
PICK f025c53dba: Remove the fallback to wsl.exe when HKCU\...\Lxss doesn't exist (#13436)
 OK
```
This commit is contained in:
Dustin L. Howett
2022-07-06 06:11:53 -05:00
committed by GitHub
parent c6b67aad4b
commit 16028dee8b

View File

@@ -61,6 +61,17 @@ Function Reject() {
$Host.ExitNestedPrompt()
}
If ([String]::IsNullOrEmpty($Version)) {
$BranchVersionRegex = [Regex]"^release-(\d+(\.\d+)+)$"
$Branch = & git rev-parse --abbrev-ref HEAD
$Version = $BranchVersionRegex.Match($Branch).Groups[1].Value
If ([String]::IsNullOrEmpty($Version)) {
Write-Error "No version specified, and we can't infer it from the name of your branch ($Branch)."
Exit 1
}
Write-Host "Inferred servicing version $Version"
}
$Script:TodoColumnName = "To Cherry Pick"
$Script:DoneColumnName = "Cherry Picked"
$Script:RejectColumnName = "Rejected"