]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
cleanup maven repo before build. set BUILD_NUMBER in version correctly
authorHolger Levsen <holger@layer-acht.org>
Wed, 24 Jul 2013 16:59:39 +0000 (18:59 +0200)
committerHolger Levsen <holger@layer-acht.org>
Wed, 24 Jul 2013 16:59:39 +0000 (18:59 +0200)
maven_post_build_debian_wrapper.sh
maven_pre_build_debian_wrapper.sh

index 18be926a102aa4c741eae9f9a23e886c34350ca1..869a5f05336b2d3a42eebbcebc0c29cfed611faf 100755 (executable)
@@ -61,7 +61,7 @@ function validateInput
        # remove -SNAPSHOT
         VERSION=$(echo $VERSION | sed -s "s#-SNAPSHOT##g")
        BUILD_START=$(date +%Y%m%d%H%M%S)
-       VERSION="${VERSION}~${APPEND_TO_VERSION}${BUILD_START}+{BUILD_NUMBER}+g${GIT_COMMIT:0:7}"
+       VERSION="${VERSION}~${APPEND_TO_VERSION}${BUILD_START}+${BUILD_NUMBER}+g${GIT_COMMIT:0:7}"
         echo "=================================="
         echo $VERSION
         echo "=================================="
@@ -120,6 +120,5 @@ if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] ; then
        fi
 fi
 
-
 #TODO: remove this debug output
 export
index e4aaab9d6119ca197e8f1143f1f9284d7be14d1d..086c051b5292fa0a9f7dc0b0ee28dec31fb87717 100755 (executable)
@@ -1,7 +1,14 @@
 #!/bin/bash
 
+#TODO: remove this debug output
+export
+
 set -e
 
+cd $WORKSPACE
+# remove old maven repository if exists
+[ -d .repository ] && rm .repository -rf
+# clean up git
 git reset --hard
 
 if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] ; then