File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,11 @@ steps:
44
44
:branch
45
45
echo Set the repo branch to be what build.SourceBranchName is: %BUILD_SOURCEBRANCHNAME%
46
46
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
+ )
48
52
goto done
49
53
50
54
:done
@@ -74,7 +78,11 @@ steps:
74
78
echo "Operation mode has been set to: $_OPERATION"
75
79
echo "##vso[task.setvariable variable=operation]$_OPERATION"
76
80
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
78
86
fi
79
87
80
88
displayName: Set_Operation_PR_or_Branch_Unix
You can’t perform that action at this time.
0 commit comments