Skip to content

Commit

Permalink
Merge pull request #3850 from StephenBonikowsky/stebon/3.0.0/infrastr…
Browse files Browse the repository at this point in the history
…uctureupdates

Fix script to use the correct branch name for updating the test service.
  • Loading branch information
StephenBonikowsky authored Aug 30, 2019
2 parents d23cce2 + 43114cc commit afba3c3
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions eng/UpdatePRService.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ steps:
goto done
: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%
goto done
IF '%BUILD_SOURCEBRANCHNAME%'=='3.0.0' OR '%BUILD_SOURCEBRANCHNAME%'=='2.1.0' (
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/release/%BUILD_SOURCEBRANCHNAME%
) ELSE (
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%
goto done
)
:done
exit /b %_EXITCODE%
Expand Down Expand Up @@ -73,8 +78,13 @@ steps:
_OPERATION=branch
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 = 3.0.0 || $BUILD_SOURCEBRANCHNAME = 2.1.0 ]]; then
echo "Set the repo branch to be what build.SourceBranchName is: $BUILD_SOURCEBRANCHNAME"
echo "##vso[task.setvariable variable=branchNameorPrId]origin/release/$BUILD_SOURCEBRANCHNAME"
else
echo "Set the repo branch to be what build.SourceBranchName is: $BUILD_SOURCEBRANCHNAME"
echo "##vso[task.setvariable variable=branchNameorPrId]origin/$BUILD_SOURCEBRANCHNAME"
fi
fi
displayName: Set_Operation_PR_or_Branch_Unix
Expand Down

0 comments on commit afba3c3

Please sign in to comment.