From b7fad46f1bd6b2882a63f909310237b69e7e3bda Mon Sep 17 00:00:00 2001 From: Matej Urbas Date: Mon, 21 May 2018 16:50:00 +0100 Subject: [PATCH] Travis CI not checking out a branch. The command in `.travis.yml` that is supposed to checkout the branch did not actually check out the branch. --- .travis.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index a590c5a3..9f369043 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,18 +4,9 @@ sudo: false # Want 'bash' but 'c' works: language: c -branches: - only: - - master - - /^release\// - script: -- git checkout $( - git branch --contains HEAD - | cut -c3- - | grep -E '^(master$|release)' - | head -1 - ) +# NOTE: we have to make sure we're on a branch (rather than on a detached HEAD) because tests rely on it. +- git checkout -b travis-ci-dummy-branch-name - GIT_COMMITTER_NAME=Bob GIT_COMMITTER_EMAIL=bob@blob.net GIT_AUTHOR_NAME='Bob Blob'