]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
retab
authorTobias von der Krone <tobias.vonderkrone@profitbricks.com>
Mon, 29 Jul 2013 07:27:34 +0000 (09:27 +0200)
committerTobias von der Krone <tobias.vonderkrone@profitbricks.com>
Mon, 29 Jul 2013 07:27:34 +0000 (09:27 +0200)
maven_pre_build_debian_wrapper.sh

index 50d68e165cd13ba21d54b7323847f4d10323cddd..bd3db73d2a986c1cc6d0ad36bb398dc395d72dab 100755 (executable)
@@ -19,7 +19,7 @@ cd $WORKSPACE
 git reset --hard
 # respect build-triggers (triggered from a git commit message containing the string [no-test])
 if [[ "$BUILD_TRIGGERS" == *"no-test"* ]]; then
-       export NO_TEST="true"
+    export NO_TEST="true"
 fi
 export
 
@@ -28,28 +28,27 @@ figlet "$GIT_BRANCH_NAME"
 git checkout $GIT_BRANCH_NAME
 git status
 
-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/bugfix branch into integration branch
-               #
-               echo "Switching to integration branch..."
-               git checkout integration
-               git pull origin integration
-               echo "Trying to fast-forward merge $GIT_BRANCH_NAME..."
-               git fetch origin -fp
-               figlet "integration merge"
-               git merge --no-ff origin/$GIT_BRANCH_NAME
-       fi
-elif [ "$GIT_BRANCH_NAME" = "master" ] || [ "${GIT_BRANCH_NAME:0:7}" = "hotfix/" ] ; then
-       #
-       # check whether we will able to 'git tag' after the build by trying it now
-       #
-       VERSION=$(mvn -B -N help:evaluate -Dexpression=project.version 2>/dev/null| grep -v "^\[")
-       TAG=$(echo $VERSION | tr '~' '_' | tr ':' ',')
-       git tag $TAG -m "Testing whether there is already a tag $TAG..."
-       git tag -d $TAG
+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/bugfix branch into integration branch
+        #
+        echo "Switching to integration branch..."
+        git checkout integration
+        git pull origin integration
+        echo "Trying to fast-forward merge $GIT_BRANCH_NAME..."
+        git fetch origin -fp
+        figlet "integration merge"
+        git merge --no-ff origin/$GIT_BRANCH_NAME
+    fi
+elif [ "$GIT_BRANCH_NAME" = "master" ] || [ "${GIT_BRANCH_NAME:0:7}" = "hotfix/" ]; then
+    #
+    # check whether we will able to 'git tag' after the build by trying it now
+    #
+    VERSION=$(mvn -B -N help:evaluate -Dexpression=project.version 2>/dev/null| grep -v "^\[")
+    TAG=$(echo $VERSION | tr '~' '_' | tr ':' ',')
+    git tag $TAG -m "Testing whether there is already a tag $TAG..."
+    git tag -d $TAG
 fi
 
-