I am using following piece of code in Travis file.
deploy:
skip_cleanup: true
provider: script
script: bash some_script.sh hello_arg
on:
all_branches: true
condition: ($TRAVIS_BRANCH =~ /.*(?i:hotfix).*|\bdev\b/) AND ($TRAVIS_EVENT_TYPE != cron)
I get the following error each time build starts:
Worker information
startup: 6.406738177s
/home/travis/.travis/job_stages: line 728: expected `)'
/home/travis/.travis/job_stages: line 728: syntax error near `AND'
/home/travis/.travis/job_stages: line 728: ` if [[ (($TRAVIS_BRANCH =~ /.*(?i:hotfix).*|\bdev\b/) AND ($TRAVIS_EVENT_TYPE != cron)) ]]; then'
Update:
I find the reason is that two conditions cant be under Condition:
.