@@ -14,9 +14,6 @@ parameters:
14
14
- name : BaseBranch
15
15
displayName : Base Branch
16
16
default : dev
17
- - name : GenerationBranch
18
- displayName : Generation branch
19
- default : v2/generation
20
17
- name : SkipForceRefresh
21
18
displayName : Skip Force Refresh
22
19
default : false
@@ -40,7 +37,6 @@ parameters:
40
37
variables :
41
38
Branch : " WeeklyApiRefresh"
42
39
BaseBranch : ${{ parameters.BaseBranch }}
43
- GenerationBranch : ${{ parameters.GenerationBranch }}
44
40
BuildAgent : ${{ parameters.BuildAgent }}
45
41
SkipForceRefresh : ${{ parameters.SkipForceRefresh }}
46
42
trigger : none
@@ -142,51 +138,4 @@ extends:
142
138
BaseBranch : $(BaseBranch)
143
139
TargetBranch : $(WeeklyBranch)
144
140
Title : " [v2] Weekly OpenApiDocs Refresh"
145
- Body : " This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."
146
- - task : PowerShell@2
147
- name : " ComputeGenerationBranch"
148
- displayName : " Compute weekly generation branch name"
149
- inputs :
150
- targetType : inline
151
- script : |
152
- $branch = "{0}/{1}" -f "WeeklyGeneration", (Get-Date -Format yyyyMMddHHmm)
153
- Write-Host "##vso[task.setvariable variable=WeeklyGenerationBranch;isOutput=true]$branch"
154
- - task : Bash@3
155
- displayName : " Create weekly generation branch"
156
- inputs :
157
- targetType : inline
158
- script : |
159
- git status
160
- git branch $(ComputeGenerationBranch.WeeklyGenerationBranch)
161
- git checkout $(ComputeGenerationBranch.WeeklyGenerationBranch)
162
- git status
163
- - task : Bash@3
164
- displayName : Commit Generated SDK artifacts
165
- enabled : true
166
- env :
167
- GITHUB_TOKEN : $(GITHUB_TOKEN)
168
- inputs :
169
- targetType : inline
170
- script : |
171
- git add .
172
- git commit -m 'Adds generated module artifacts'
173
- git push "https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git"
174
- git status
175
- - task : Bash@3
176
- displayName : Sync with generation branch
177
- enabled : true
178
- env :
179
- GITHUB_TOKEN : $(GITHUB_TOKEN)
180
- inputs :
181
- targetType : inline
182
- script : |
183
- git merge $(GenerationBranch) -s ours
184
- git push "https://$(GITHUB_TOKEN)@github.com/microsoftgraph/msgraph-sdk-powershell.git"
185
- git status
186
- - ${{ if eq(parameters.CreatePullRequest, true) }} :
187
- - template : .azure-pipelines/common-templates/create-pr.yml@self
188
- parameters :
189
- BaseBranch : $(GenerationBranch)
190
- TargetBranch : $(ComputeGenerationBranch.WeeklyGenerationBranch)
191
- Title : " [v2] Weekly Generated Module Artifacts"
192
141
Body : " This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."
0 commit comments