How to run curl command in .travis.yaml before_install by passing token

17 views Asked by At

I have below lines of code in .travis.yaml under before_install section

  - if [[ "$MAKE_TASK" == "buildgo" ]]; then
      echo "hi";
      echo "hello";
      ASSETURL=$(curl -X GET -H 'Authorization: token ${GHE_TOKEN}' \"https://github.xxx.com/api/v3/repos/test-registry/base/releases/latest\" | jq -r '.assets[0].url');
    fi

hi and hello commands are printed. But curl command throws Could not parse yaml file error.

0

There are 0 answers