From: Holger Levsen Date: Fri, 26 Jul 2013 13:54:10 +0000 (+0200) Subject: add support for bugfix branches X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=3ced6b250f316333631794bd9339e216a5bb0bcc;p=profitbricks%2Fjenkins-build-scripts.git add support for bugfix branches --- diff --git a/maven_post_build_debian_wrapper.sh b/maven_post_build_debian_wrapper.sh index c85b0c4..abe185b 100755 --- a/maven_post_build_debian_wrapper.sh +++ b/maven_post_build_debian_wrapper.sh @@ -28,7 +28,7 @@ function validateSettings exit 1 fi - if [ "$GIT_BRANCH_NAME" = "integration" ] || [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] || [ ${GIT_BRANCH_NAME:0:3} = "poc/" ]; then + if [ "$GIT_BRANCH_NAME" = "integration" ] || [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] || [ ${GIT_BRANCH_NAME:0:3} = "poc/" ] || [ ${GIT_BRANCH_NAME:0:7} = "bugfix/" ]; then APPEND_TO_VERSION="experimental" REPO="dev-${SUITE}" if [ "$GIT_BRANCH_NAME" = "integration" ] ; then @@ -131,7 +131,7 @@ dpkg-parsechangelog cleanup # push back integration branch if we merged a feature branch -if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] ; then +if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] || [ ${GIT_BRANCH_NAME:0:7} = "bugfix/" ]; then if [[ "$BUILD_TRIGGERS" == *"merge"* ]]; then git push origin integration git checkout origin/$GIT_BRANCH_NAME -b $GIT_BRANCH_NAME diff --git a/maven_pre_build_debian_wrapper.sh b/maven_pre_build_debian_wrapper.sh index 4ba334b..7eb6426 100755 --- a/maven_pre_build_debian_wrapper.sh +++ b/maven_pre_build_debian_wrapper.sh @@ -18,11 +18,11 @@ cd $WORKSPACE # clean up git git reset --hard -if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] ; then +if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] || [ ${GIT_BRANCH_NAME:0:7} = "bugfix/" ] ; then if [[ "$BUILD_TRIGGERS" == *"merge"* ]]; then # # if triggered to 'merge' via git commit, - # merge feature branch into integration branch + # merge feature/bugfix branch into integration branch # echo "Switching to integration branch..." git checkout integration