Skip to content

Commit 5377151

Browse files
Merge branch 'endgame-202401' into develop
2 parents 04d9bd1 + 730db20 commit 5377151

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.azure-pipelines/sign-for-dev-release.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,23 +80,36 @@ extends:
8080
inputs:
8181
targetType: inline
8282
script: |-
83-
TARGET_BRANCH=$(TOOLKIT_BRANCH)
83+
CUSTOM_BRANCH=$(TOOLKIT_BRANCH)
84+
SOURCE_BRANCH=$(System.PullRequest.SourceBranch 2>/dev/null)
85+
TARGET_BRANCH=$(System.PullRequest.TargetBranch 2>/dev/null)
8486
8587
ls ~/.m2/repository/com/microsoft/azure/azure-toolkit-*
8688
cd ..
8789
git clone https://github.com/microsoft/azure-maven-plugins.git
88-
cd azure-maven-plugins
90+
cd azure-maven-plugins/azure-toolkit-libs
8991
90-
echo "build azure-toolkit-libs: $TARGET_BRANCH"
91-
git fetch origin $TARGET_BRANCH
92-
git checkout $TARGET_BRANCH
92+
custom_existed_in_remote=$(git ls-remote --heads origin ${CUSTOM_BRANCH})
93+
source_existed_in_remote=$(git ls-remote --heads origin ${SOURCE_BRANCH})
94+
target_existed_in_remote=$(git ls-remote --heads origin ${TARGET_BRANCH})
95+
if [[ -n ${custom_existed_in_remote} ]]; then
96+
BRANCH=$CUSTOM_BRANCH
97+
elif [[ -n ${source_existed_in_remote} ]]; then
98+
BRANCH=$SOURCE_BRANCH
99+
elif [[ -n ${target_existed_in_remote} ]]; then
100+
BRANCH=$TARGET_BRANCH
101+
fi
102+
103+
echo "build azure-toolkit-libs: $BRANCH"
104+
git fetch origin $BRANCH
105+
git checkout $BRANCH
93106
94107
git branch
95108
mvn clean install -T 4 -Dmaven.test.skip=true -Dmdep.analyze.skip=true -Dmaven.source.skip=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip -B|| exit -1
96109
97110
ls ~/.m2/repository/com/microsoft/azure/azure-toolkit-*
98111
echo "cleaning up battlefield."
99-
cd ../
112+
cd ../../
100113
rm -rf ./azure-maven-plugins
101114
exit 0
102115
- task: Bash@3

0 commit comments

Comments
 (0)