@@ -7,12 +7,12 @@ parameters:
77- name : scope
88 displayName : Select target Autorest modules
99 type : string
10- default : autorest-all
10+ default : autorest-selected
1111 values :
12- - autorest-all
12+ - autorest-selected
1313 - autorest-v3-only
1414 - autorest-v4-only
15- - autorest-selected
15+ - autorest-all
1616
1717- name : selectedServices
1818 displayName : Input service names you want to refresh separated by semi-colon (;). Wildcard match is supported.
5555 script : |
5656 $autorestPaths = @()
5757 $autorestModules = Get-ChildItem -Filter "*.Autorest" -Directory -Recurse | Select-Object -ExpandProperty FullName
58- if ("${{ parameters.scope }}" -eq "autorest-v3-v4 ") {
58+ if ("${{ parameters.scope }}" -eq "autorest-all ") {
5959 $autorestPaths = $autorestModules
6060 }
6161 elseif ("${{ parameters.scope }}" -eq "autorest-selected") {
@@ -144,9 +144,10 @@ jobs:
144144 Write-Host "##[endgroup]"
145145 Write-Host
146146 }
147+ $buildId = $(Build.BuildId)
147148
148149 Set-Location ..
149- git checkout -b ' codegen/${{ parameters.scope }}' 'origin/${{ parameters.targetBranch }}'
150+ git checkout -b " codegen/${{ parameters.scope }}-$buildId" 'origin/${{ parameters.targetBranch }}'
150151
151152 - task : PowerShell@2
152153 displayName : Migrate from generation to target branch
@@ -189,7 +190,8 @@ jobs:
189190 targetType : inline
190191 script : |
191192 $sourceBranch = '$(Build.SourceBranch)'.Replace("refs/heads/", "")
192- $headBranch = 'codegen/${{ parameters.scope }}'
193+ $buildId = $(Build.BuildId)
194+ $headBranch = "codegen/${{ parameters.scope }}-$buildId"
193195 $baseBranch = '${{ parameters.targetBranch }}'
194196 git config user.email "[email protected] " 195197 git config user.name "azure-powershell-bot"
0 commit comments