Skip to content

Commit b9e2cc4

Browse files
TSK-1050: fixed pushback to github and let the build fail if it wont work
1 parent eb53a3d commit b9e2cc4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ jobs:
110110
!:taskana-rest-spring-example-boot,!:taskana-rest-spring-example-wildfly,\
111111
!:taskana-simplehistory-spring-test,!:taskana-simplehistory-rest-spring-example
112112
before_cache: rm -rf "$HOME/.m2/repository/pro/taskana"
113-
after_success: ci/change_version.sh -i -m . && ci/commitPoms.sh
113+
# travis_terminate is necessary since after_success is a job phase which can change the build result.
114+
# it is not documented, so this is a little hack. see: https://docs.travis-ci.com/user/job-lifecycle/#breaking-the-build
115+
after_success: ci/change_version.sh -i -m . && ci/commitPoms.sh || travis_terminate 1
114116
deploy:
115117
provider: cloudfoundry
116118
username: $BLUEMIX_ACCOUNT

ci/commitPoms.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ function main() {
6161
git config --global user.name $GH_USERNAME
6262

6363
#commit all poms
64-
git checkout -b "$branch"
65-
#to compensate new updates
66-
git pull
64+
git checkout "$branch"
6765
git add "./*pom.xml"
6866
for file in "$@"; do
6967
[[ -n "$file" ]] && git add "$file"

0 commit comments

Comments
 (0)