From: Holger Levsen Date: Wed, 24 Jul 2013 16:22:57 +0000 (+0200) Subject: correctly detect merge triggers X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=95519619b23a37ff332d981514345298f75da731;p=profitbricks%2Fjenkins-build-scripts.git correctly detect merge triggers --- diff --git a/maven_pre_build_debian_wrapper.sh b/maven_pre_build_debian_wrapper.sh index b8cf170..6192b96 100755 --- a/maven_pre_build_debian_wrapper.sh +++ b/maven_pre_build_debian_wrapper.sh @@ -1,15 +1,9 @@ #!/bin/bash -function containsElement () { - local e - for e in "${@:2}"; do [[ "$e" = "$1" ]] && return 0; done - return 1 -} - set -e if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] ; then - if containsElement "merge" "${BUILD_TRIGGERS[@]}" ; then + if [[ "$BUILD_TRIGGERS" == *"merge"* ]]; then echo "Switching to integration branch..." git checkout integration echo "Trying to fast-forward merge $GIT_BRANCH_NAME..."