From da72b09750f46cb7d9422a367bf93232e90f0473 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 28 Feb 2017 07:17:01 -0800 Subject: [PATCH] updated branch detection --- jenkins.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jenkins.sh b/jenkins.sh index e9508848..2ccec1af 100644 --- a/jenkins.sh +++ b/jenkins.sh @@ -13,6 +13,7 @@ echo isPR: $1 originRegex="^origin/.*" branchRegex="^origin/\K.*(?=$)" +releaseBranchRegex = "^(master|v\d+)$" if [[ "$GIT_BRANCH" =~ $originRegex ]]; then branchName=$(echo ${GIT_BRANCH} | grep -oP $branchRegex) @@ -27,7 +28,7 @@ if [ "$1" == "false" ]; then echo Setting TRAVIS_PULL_REQUEST to false export TRAVIS_PULL_REQUEST=false - if [ $TRAVIS_BRANCH == "master" || $TRAVIS_BRANCH == "v0" ]; then + if [[ "$TRAVIS_BRANCH" =~ $releaseBranchRegex ]]; then if [[ -z $PXT_RELEASE_REPO ]]; then echo Cannot find release repo; skipping tag checks else