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

"conditional binary operator expected" around IS tag #16

Open
KengoTODA opened this issue Oct 29, 2018 · 1 comment
Open

"conditional binary operator expected" around IS tag #16

KengoTODA opened this issue Oct 29, 2018 · 1 comment

Comments

@KengoTODA
Copy link

KengoTODA commented Oct 29, 2018

Thanks for providing nice tool & platform, that helps our daily hacking!

Today I want to report one problem found in our project.
In this build, we can see unexpected error around deploy condition:

/home/travis/.travis/job_stages: line 1443: conditional binary operator expected
/home/travis/.travis/job_stages: line 1443: expected `)'
/home/travis/.travis/job_stages: line 1443: expected `)'
/home/travis/.travis/job_stages: line 1443: syntax error near `IS'
/home/travis/.travis/job_stages: line 1443: `  if [[ ($TRAVIS_JDK_VERSION = oraclejdk8) && ((branch = master || branch = "release-3.1" || tag IS present) && type = push) ]]; then'

I've confirmed that condition can be parsed by travis-conditions command like below:

$ travis-conditions parse "(branch = master || branch = "release-3.1" || tag IS present) && type = push"
[:and,
 [:or,
  [:or,
   [:eq, [:var, :branch], [:val, "master"]],
   [:eq, [:var, :branch], [:val, "release-3.1"]]],
  [:is, [:var, :tag], :present]],
 [:eq, [:var, :type], [:val, "push"]]]

I think that generated bash command should not contain IS, because if [[ (tag IS present) ]]; does not work even in my local shell.

@abhinayagarwal
Copy link

I have a similar issue where using condition: $TRAVIS_BRANCH IN (master, 9.0.0) results in:

/home/travis/.travis/job_stages: line 642: conditional binary operator expected
/home/travis/.travis/job_stages: line 642: expected `)'
/home/travis/.travis/job_stages: line 642: syntax error near `IN'
/home/travis/.travis/job_stages: line 642: `  if [[ ($TRAVIS_BRANCH = master) && ($TRAVIS_BRANCH IN (master, 9.0.0)) ]]; then'

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

No branches or pull requests

2 participants