Browse Source

Silent cancelation of branch build on Travis if a PR is open

tags/6.7.1
Stas Vilchik 6 years ago
parent
commit
e18defef28
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      travis.sh

+ 5
- 4
travis.sh View File

@@ -105,15 +105,16 @@ function fixBuildVersion {
#
function configureTravis {
mkdir -p ~/.local
curl -sSL https://github.com/SonarSource/travis-utils/tarball/v38 | tar zx --strip-components 1 -C ~/.local
curl -sSL https://github.com/SonarSource/travis-utils/tarball/v41 | tar zx --strip-components 1 -C ~/.local
source ~/.local/bin/install
}
configureTravis

# When pull request exists on the branch, then the job related to the branch does not need
# to be executed and should be canceled. It does not book slaves for nothing.
# When a pull request is open on the branch, then the job related
# to the branch does not need to be executed and should be canceled.
# It does not book slaves for nothing.
# @TravisCI please provide the feature natively, like at AppVeyor or CircleCI ;-)
cancel_branch_build_with_pr
cancel_branch_build_with_pr || if [[ $? -eq 1 ]]; then exit 0; fi

case "$TARGET" in


Loading…
Cancel
Save