git push origin $TAG
fi
+
# upload to reprepro
# TODO: implement
set +x
cleanup
+# push back integration branch if we merged a feature branch
+if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] ; then
+ if [[ "$BUILD_TRIGGERS" == *"merge"* ]]; then
+ git push origin integration
+ git checkout origin/$GIT_BRANCH_NAME -b $GIT_BRANCH_NAME
+ fi
+fi
+
+
#TODO: remove this debug output
export
set -e
+git reset --hard
+
if [ ${GIT_BRANCH_NAME:0:8} = "feature/" ] ; then
if [[ "$BUILD_TRIGGERS" == *"merge"* ]]; then
echo "Switching to integration branch..."
git checkout integration
echo "Trying to fast-forward merge $GIT_BRANCH_NAME..."
- git merge --no-ff $GIT_BRANCH_NAME
+ git merge --no-ff origin/$GIT_BRANCH_NAME
fi
elif [ "$GIT_BRANCH_NAME" = "master" ] || [ "${GIT_BRANCH_NAME:0:7}" = "hotfix/" ] ; then
VERSION=$(mvn -B -N help:evaluate -Dexpression=project.version 2>/dev/null| grep -v "^\[")