Skip to content

Fixes Travis CI build. It was not checking out a branch. #358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,9 @@ sudo: false
# Want 'bash' but 'c' works:
language: c

branches:
only:
- master
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice if we can build branches other than master and release. This makes it easy for forkers to test their non-master branches in their own repositories.

@ingydotnet: Is there are reason only some branches are allowed?

- /^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
[email protected]
GIT_AUTHOR_NAME='Bob Blob'
Expand Down