From 44c4dc46d415ee0bea22bba68c9d8db0b375e12e Mon Sep 17 00:00:00 2001 From: David Vo Date: Mon, 5 Aug 2019 16:22:43 +1000 Subject: [PATCH] Find branch name for Azure Pipelines --- .travis/fixup-git.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis/fixup-git.sh b/.travis/fixup-git.sh index 9c070995f..f1ae90a71 100755 --- a/.travis/fixup-git.sh +++ b/.travis/fixup-git.sh @@ -106,6 +106,14 @@ if [ "$TRAVIS_COMMIT_ACTUAL" != "$TRAVIS_COMMIT" ]; then TRAVIS_COMMIT=$TRAVIS_COMMIT_ACTUAL fi +if [ z"$TRAVIS_BRANCH" = z ]; then + if [ z"$BUILD_SOURCEBRANCH" != z ]; then + TRAVIS_BRANCH="$BUILD_SOURCEBRANCH" + elif [ z"$SYSTEM_PULLREQUEST_TARGETBRANCH" != z ]; then + TRAVIS_BRANCH="$SYSTEM_PULLREQUEST_TARGETBRANCH" + fi +fi + if [ z"$TRAVIS_BRANCH" != z ]; then echo "" echo ""