Skip to content

Commit 9536c6e

Browse files
committed
check branch
1 parent c41d00c commit 9536c6e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.azure-pipelines/batch-generation.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ stages:
5555
$createBranchPath = Join-Path "$(Build.SourcesDirectory)" '.azure-pipelines' 'PipelineSteps' 'BatchGeneration' 'create-branch.ps1'
5656
& $createBranchPath -Owner 'Azure' -Repo 'azure-powershell' -BaseBranch "$(GenerationBaseBranch)" -NewBranch $generationBranch -Token $token
5757
Write-Host "##vso[task.setvariable variable=GenerationBranch;isOutput=true]$generationBranch"
58+
Write-Host "Current branch right after creating generation branch: $(git rev-parse --abbrev-ref HEAD)"
59+
60+
$sourceBranchName = "$(Build.SourceBranch)".Replace('refs/heads/', '')
61+
git checkout $sourceBranchName
62+
Write-Host "Current branch right after checkout source branch: $(git rev-parse --abbrev-ref HEAD)"
63+
5864
5965
- task: PowerShell@2
6066
name: version
@@ -76,6 +82,7 @@ stages:
7682
targetType: inline
7783
pwsh: true
7884
script: |
85+
Write-Host "Current branch: $(git rev-parse --abbrev-ref HEAD)"
7986
$prepareModulesPath = Join-Path "$(Build.SourcesDirectory)" '.azure-pipelines' 'PipelineSteps' 'BatchGeneration' 'prepare.ps1'
8087
& $prepareModulesPath -RepoRoot "$(Build.SourcesDirectory)" -MaxParallelJobs "${{ variables.MaxParallelGenerateJobs }}"
8188

0 commit comments

Comments
 (0)