travis-ci / travis-conditions

Boolean language for conditional builds, stages, jobs
MIT License
20 stars 4 forks source link

eval examples should use single quotes `'` #21

Open pvinis opened 5 years ago

pvinis commented 5 years ago

examples like

$ travis-conditions eval "branch = foo" --data '{"branch": "foo"}' 

should be like

$ travis-conditions eval 'branch = foo' --data '{"branch": "foo"}'

The reason is that I have for example this:

travis-conditions eval "branch =~ /^release\/(alpha|beta|prod)$/ AND commit_message =~ /\[.*JS.*\]/ AND commit_message !~ /\[.*IOS.*\]/" --data '{"branch": "release/alpha"}'

and as you can see there is !~ in there. This causes the shell to look in the history, resulting in a event not found error.

Using single quotes instead works as expected.