Skip to content

Commit fbb5aef

Browse files
Merge pull request #3989 from StephenBonikowsky/stebon/3.1.0/infraupdates
Fixing branch name logic.
2 parents 0f5cf6c + bb026c2 commit fbb5aef

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

eng/UpdatePRService.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ steps:
4444
:branch
4545
echo Set the repo branch to be what build.SourceBranchName is: %BUILD_SOURCEBRANCHNAME%
4646
REM The following vso call sets a variable that is accessible further down in the PowerShell script to Sync the PR Service.
47-
echo ##vso[task.setvariable variable=branchNameorPrId]origin/%BUILD_SOURCEBRANCHNAME%
47+
IF '%BUILD_SOURCEBRANCHNAME%'=='master' (
48+
echo ##vso[task.setvariable variable=branchNameorPrId]origin/%BUILD_SOURCEBRANCHNAME%
49+
) ELSE (
50+
echo ##vso[task.setvariable variable=branchNameorPrId]origin/release/%BUILD_SOURCEBRANCHNAME%
51+
)
4852
goto done
4953
5054
:done
@@ -74,7 +78,11 @@ steps:
7478
echo "Operation mode has been set to: $_OPERATION"
7579
echo "##vso[task.setvariable variable=operation]$_OPERATION"
7680
echo "Set the repo branch to be what build.SourceBranchName is: $BUILD_SOURCEBRANCHNAME"
77-
echo "##vso[task.setvariable variable=branchNameorPrId]origin/$BUILD_SOURCEBRANCHNAME"
81+
if [[ $BUILD_SOURCEBRANCHNAME = master ]]; then
82+
echo "##vso[task.setvariable variable=branchNameorPrId]origin/$BUILD_SOURCEBRANCHNAME"
83+
else
84+
echo "##vso[task.setvariable variable=branchNameorPrId]origin/release/$BUILD_SOURCEBRANCHNAME"
85+
fi
7886
fi
7987
8088
displayName: Set_Operation_PR_or_Branch_Unix

0 commit comments

Comments
 (0)