Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ashmaroli
Copy link
Member

Resolves #42

.travis.yml Outdated
jobs:
include:
-
if: branch = master AND (type != pull_request OR type != api)
Copy link
Member

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?

Copy link
Member Author

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)

Copy link
Member

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

Copy link
Member Author

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..

Copy link
Member

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)

Copy link
Member

@pathawks pathawks Jul 23, 2018

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.

Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants