Skip to content

Commit

Permalink
Merge pull request #3989 from StephenBonikowsky/stebon/3.1.0/infraupd…
Browse files Browse the repository at this point in the history
…ates

Fixing branch name logic.
  • Loading branch information
StephenBonikowsky authored Oct 23, 2019
2 parents 0f5cf6c + bb026c2 commit fbb5aef
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions eng/UpdatePRService.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ steps:
:branch
echo Set the repo branch to be what build.SourceBranchName is: %BUILD_SOURCEBRANCHNAME%
REM The following vso call sets a variable that is accessible further down in the PowerShell script to Sync the PR Service.
echo ##vso[task.setvariable variable=branchNameorPrId]origin/%BUILD_SOURCEBRANCHNAME%
IF '%BUILD_SOURCEBRANCHNAME%'=='master' (
echo ##vso[task.setvariable variable=branchNameorPrId]origin/%BUILD_SOURCEBRANCHNAME%
) ELSE (
echo ##vso[task.setvariable variable=branchNameorPrId]origin/release/%BUILD_SOURCEBRANCHNAME%
)
goto done
:done
Expand Down Expand Up @@ -74,7 +78,11 @@ steps:
echo "Operation mode has been set to: $_OPERATION"
echo "##vso[task.setvariable variable=operation]$_OPERATION"
echo "Set the repo branch to be what build.SourceBranchName is: $BUILD_SOURCEBRANCHNAME"
echo "##vso[task.setvariable variable=branchNameorPrId]origin/$BUILD_SOURCEBRANCHNAME"
if [[ $BUILD_SOURCEBRANCHNAME = master ]]; then
echo "##vso[task.setvariable variable=branchNameorPrId]origin/$BUILD_SOURCEBRANCHNAME"
else
echo "##vso[task.setvariable variable=branchNameorPrId]origin/release/$BUILD_SOURCEBRANCHNAME"
fi
fi
displayName: Set_Operation_PR_or_Branch_Unix
Expand Down

0 comments on commit fbb5aef

Please sign in to comment.