@@ -14,9 +14,6 @@ parameters:
1414- name : BaseBranch
1515 displayName : Base Branch
1616 default : dev
17- - name : GenerationBranch
18- displayName : Generation branch
19- default : v2/generation
2017- name : SkipForceRefresh
2118 displayName : Skip Force Refresh
2219 default : false
@@ -40,7 +37,6 @@ parameters:
4037variables :
4138 Branch : " WeeklyApiRefresh"
4239 BaseBranch : ${{ parameters.BaseBranch }}
43- GenerationBranch : ${{ parameters.GenerationBranch }}
4440 BuildAgent : ${{ parameters.BuildAgent }}
4541 SkipForceRefresh : ${{ parameters.SkipForceRefresh }}
4642trigger : none
@@ -142,51 +138,4 @@ extends:
142138 BaseBranch : $(BaseBranch)
143139 TargetBranch : $(WeeklyBranch)
144140 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"
192141 Body : " This pull request was automatically created by Azure Pipelines. **Important** Check for unexpected deletions or changes in this PR."
0 commit comments