@@ -7,12 +7,12 @@ parameters:
7
7
- name : scope
8
8
displayName : Select target Autorest modules
9
9
type : string
10
- default : autorest-all
10
+ default : autorest-selected
11
11
values :
12
- - autorest-all
12
+ - autorest-selected
13
13
- autorest-v3-only
14
14
- autorest-v4-only
15
- - autorest-selected
15
+ - autorest-all
16
16
17
17
- name : selectedServices
18
18
displayName : Input service names you want to refresh separated by semi-colon (;). Wildcard match is supported.
55
55
script : |
56
56
$autorestPaths = @()
57
57
$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 ") {
59
59
$autorestPaths = $autorestModules
60
60
}
61
61
elseif ("${{ parameters.scope }}" -eq "autorest-selected") {
@@ -144,9 +144,10 @@ jobs:
144
144
Write-Host "##[endgroup]"
145
145
Write-Host
146
146
}
147
+ $buildId = $(Build.BuildId)
147
148
148
149
Set-Location ..
149
- git checkout -b ' codegen/${{ parameters.scope }}' 'origin/${{ parameters.targetBranch }}'
150
+ git checkout -b " codegen/${{ parameters.scope }}-$buildId" 'origin/${{ parameters.targetBranch }}'
150
151
151
152
- task : PowerShell@2
152
153
displayName : Migrate from generation to target branch
@@ -189,7 +190,8 @@ jobs:
189
190
targetType : inline
190
191
script : |
191
192
$sourceBranch = '$(Build.SourceBranch)'.Replace("refs/heads/", "")
192
- $headBranch = 'codegen/${{ parameters.scope }}'
193
+ $buildId = $(Build.BuildId)
194
+ $headBranch = "codegen/${{ parameters.scope }}-$buildId"
193
195
$baseBranch = '${{ parameters.targetBranch }}'
194
196
git config user.email "[email protected] "
195
197
git config user.name "azure-powershell-bot"
0 commit comments