bash - If statement with "unexpected end of file" on circleCI -


i'm trying condition in tests print echo "showing dev branch" if branch name development i'm receiving error

if [ "${circle_branch}" == "development"];  echo "showing dev branch" fi bash: -c: line 2: syntax error: unexpected end of file  if [ "${circle_branch}" == "development"];  echo "showing dev branch" fi returned exit code 1 

see circle.yml below:

general:   artifacts:     - "test_evidences"   branches:     only:       - development  machine:   node:     version: 6.10.3  dependencies:   pre:     - curl -l -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb     - sudo dpkg -i google-chrome.deb     - sudo sed -i 's|here/chrome\"|here/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome     - rm google-chrome.deb     - npm install     - npm install -g grunt grunt-cli   override:     - node_modules/.bin/webdriver-manager update  test:   pre:      - sleep 60   override:     - if [ "${circle_branch}" == "development"];           echo "showing dev branch"        fi     - grunt apitests     - node_modules/.bin/protractor conf.js     - sed -i -- 's,//,/,g' test_evidences/htmlreport.html 

problem solved!

my new circle.yml file is:

#!/usr/bin/env bash  general:   artifacts:     - "test_evidences"   branches:     only:       - development  machine:   node:     version: 6.10.3  dependencies:   pre:     - curl -l -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb     - sudo dpkg -i google-chrome.deb     - sudo sed -i 's|here/chrome\"|here/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome     - rm google-chrome.deb     - npm install     - npm install -g grunt grunt-cli   override:     - node_modules/.bin/webdriver-manager update  test:   pre:      - sleep 60   override:     - if [ "${circle_branch}" == "development" ];           echo "showing dev branch";        fi     - grunt apitests     - node_modules/.bin/protractor conf.js     - sed -i -- 's,//,/,g' test_evidences/htmlreport.html 

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -