From: Holger Levsen Date: Wed, 24 Jul 2013 12:27:56 +0000 (+0200) Subject: add tag to successful master builds X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=1f3b02268cbbcbdd9e4eb8fda8e5dac95cda972c;p=profitbricks%2Fjenkins-build-scripts.git add tag to successful master builds --- diff --git a/debian_wrap_maven_results.sh b/debian_wrap_maven_results.sh index d1b7296..ce60935 100755 --- a/debian_wrap_maven_results.sh +++ b/debian_wrap_maven_results.sh @@ -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