So a few things I instantly see wrong in your
To be clear,
jobs: are valid values in
.travis.yml (if you don’t believe me, try lint), so they’re just discarded, tossed essentially. Travis is pretty liberal about silently dropping hooks it doesn’t know what to do with unless you specify otherwise with a verbose tag.
Specifying behavior in
env: is fine, but move the logic into a
script: block and execute your
statements there, or you could even theoretically run your
if statements from a script that the
.travis.yml calls, this would obviously be done using bash, so an example would be a file called:
Make sure this is properly credentialed using
chmod u+x. So there you have it, two ways you can properly do what you’re actually trying to do. I’m going to give you an article to read, I recommend reading it.
I recommend a bit more reading, but that should solve it for you.