-
Notifications
You must be signed in to change notification settings - Fork 27
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
Configure Travis CI to download Rubygems data for listed gems #46
base: master
Are you sure you want to change the base?
Conversation
.travis.yml
Outdated
jobs: | ||
include: | ||
- | ||
if: branch = master AND (type != pull_request OR type != api) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(type != pull_request OR type != api)
wat?
Isn't this condition always true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going for commits pushed to master
(merge commits from PRs, though I now realize that JekyllBot adds [ci skip]
to the merge commits)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I was getting at is that you mean AND
rather than OR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the type:
can be either of push
, pull_request
, api
, cron
. I felt using OR
to be more optimal. But if you feel AND
would be better, I'm fine with that..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(type != pull_request OR type != api)
The OR
statement will only evaluate to false if both type != pull_request
and type != api
are false (because that is what disjunctions are for). How is this possible? What value of type
will possibly make both of these statements false?
You may as well replace the whole condition with
branch = master AND (true)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think about it this way.
We can use DeMorgan's Law to write the following, logically equivalent statement:
!(type == pull_request AND type == api)
It is not possible for type == pull_request
and type == api
to both be true for any particular value of type
, so the AND
will always be false, and !(false)
is true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pathawks I concede. I've fixed the error and replaced the operators with "aliases" to resemble the operators used in Ruby
Resolves #42