]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
add tag to successful master builds
authorHolger Levsen <holger@layer-acht.org>
Wed, 24 Jul 2013 12:27:56 +0000 (14:27 +0200)
committerHolger Levsen <holger@layer-acht.org>
Wed, 24 Jul 2013 12:27:56 +0000 (14:27 +0200)
debian_wrap_maven_results.sh

index d1b72969c6ca39301f57193398b2a2826ed9d419..ce609355cee006346eb0423208c7edc084f053a6 100755 (executable)
@@ -38,7 +38,7 @@ function validateInput
                DISTRIBUTION="unstable"
        else
                DISTRIBUTION="experimental"
-       if
+       fi
     fi
 
     if ! containsElement $DISTRIBUTION "${VALID_DISTROS[@]}" ; then
@@ -83,8 +83,11 @@ dpkg-buildpackage -us -uc -b
 if [ "$GIT_BRANCH_NAME" = "master" ] || [ "${GIT_BRANCH_NAME:0:7}" = "hotfix/" ] ; then
        git add debian/changelog
        git commit -m "Automatic commit by jenkins after build of $BUILD_NUMBER"
-       # TODO: git tag
+       # ~ and : are not valid in git tags, replace them:
+       TAG=$(echo $VERSION | tr '~' '_' | tr ':' ',')
+       git tag $TAG
        git push origin $GIT_BRANCH_NAME
+       git push origin $TAG
 fi
 
 # upload to reprepro